Here's a simple approach that gives vectorized axes and labels but a rasterized graph. Basically just make your graph without the axes or labels, Rasterize that, then add that image as an Inset in Graphics with the appropriate axes and labels. So for your 2d case (MaTeX was giving me problems so I omitted it):
graph = DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, ImageSize -> 200, ColorFunction -> Hue, Frame -> False]; im = Rasterize[graph, Background -> None, ImageSize -> 400]; Graphics[Inset[im, {-4, -3}, {0, 0}, {8, 6}], PlotRange -> {{-4, 4}, {-3, 3}}, Frame -> True, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, FrameLabel -> (Style[#, FontSize -> 17] &) /@ {"X", "Y"}, AspectRatio -> 1, ImageSize -> 300]

For the 3d case:
graph3D = Plot3D[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, ImageSize -> 200, ColorFunction -> Hue, BoxRatios -> {1, 1, 2}, ViewPoint -> {1, -1.3, 0.5}, Axes -> False, Boxed -> False, Background -> Opacity[0]]; im3d = Rasterize[graph3D, Background -> None, ImageSize -> 200]; Graphics3D[Inset[im3d], PlotRange -> {{-4, 4}, {-3, 3}, {-1, 1}}, AxesEdge -> {{-1, -1}, {1, -1}, Automatic}, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, Axes -> True, AxesLabel -> (Style[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 250, BoxRatios -> {1, 1, 2}, ViewPoint -> {1, -1.3, 0.5}, FaceGrids -> {{0, 1, 0}, {-1, 0, 0}, {0, 0, 1}, {0, 0, -1}}, Boxed -> False]

If you want to keep all the options from PlotTheme -> "Detailed" you can make a "graph" with a trivial, transparent graph so you're just left with the axes, grids, and labels then Show that together with the Rasterized image. I.e.
axes3D = Plot3D[0, {x, -4, 4}, {y, -3, 3}, PlotPoints -> 2, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, AxesLabel -> (Style[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> (Opacity[0] &), Mesh -> None, BoundaryStyle -> None, BoxRatios -> {1, 1, 2}, ViewPoint -> {1, -1.3, 0.5}, PlotTheme -> "Detailed"]; Show[axes3D, Graphics3D[Inset[im3d]], ImageSize -> 250]

There's a lot of playing around with these approaches you can do to get the styling you like. Inset can be a bit finicky when you resize things, but it shouldn't be hard to set the options in Inset and Graphics such that it looks like you want. Plus this has the advantage that you can explicitly control what gets rasterized and what stays vectorized.