Compared to the pure-SVG viewer, viewing the kanji with https://kanjivg.tagaini.net/viewer.html it is clear that the numbers are located incorrectly, too far left and down. After a few tries with the Raphael library, this seems to be related to inherent bugs in that system which don't allow it to work well with the "transform" attribute used to position the text of the numbers in KanjiVG.
I suggest either finding some way to make Raphael put the numbers in KanjiVG's suggested positions, or better scrapping the Raphael library. Raphael doesn't seem to have been significantly updated since 2014 and may be past its sell-by date, and it's possible to display the SVG without Raphael.
Compared to the pure-SVG viewer, viewing the kanji with https://kanjivg.tagaini.net/viewer.html it is clear that the numbers are located incorrectly, too far left and down. After a few tries with the Raphael library, this seems to be related to inherent bugs in that system which don't allow it to work well with the "transform" attribute used to position the text of the numbers in KanjiVG.
I suggest either finding some way to make Raphael put the numbers in KanjiVG's suggested positions, or better scrapping the Raphael library. Raphael doesn't seem to have been significantly updated since 2014 and may be past its sell-by date, and it's possible to display the SVG without Raphael.