But note that @hmenke reverted his fix for the dvisvgm and tex4ht drivers because it broke other things, so I'm not sure if you want to do anything about this or not. It was rightly pointed out that generally \pgfuseshading probably isn't used outside a pgfpicture or tikzpicture environment very often.
Both of your issues should be fixed by a094e6540609bf3b068978b4a0942da0368121cd. It checks if it is in a vertical mode and use a correct command accordingly.
\pgfuseshading
leaves vertical mode leading to differing output from the TeX drivers.See https://github.com/pgf-tikz/pgf/issues/655
But note that @hmenke reverted his fix for the
dvisvgm
andtex4ht
drivers because it broke other things, so I'm not sure if you want to do anything about this or not. It was rightly pointed out that generally\pgfuseshading
probably isn't used outside apgfpicture
ortikzpicture
environment very often.MWE