The following format seems to work better for your example:
Hello<span class="notranslate"> (%{my_var}),</span>welcome!
The translated text:
"translatedText": "こんにちは<span class=\"notranslate\">(%{my_var}),</span>大歓迎!"
If you see spaces stripped/inserted after using this HTML tag, the behavior should be consistent at least with the language. You can process the text post-translation to make it the way your application requires.
Also, If you have any issues with the platform not working according to what you understand should be the behavior after reading documentation, please post to the
Public Issue Tracker, with steps that can reliably reproduce the behavior, and as much details as possible.
I hope that helps. Cheers!