I try to test your code sample with MS Edge (EdgeHtml) browser and I can produce the issue on my side.
It looks like there is an issue with the Edge browser and we can't fix it using code.
As per the information from MDN docs, Scale can create accessibility issues.
Scaling/zooming animations are problematic for accessibility, as they
are a common trigger for certain types of migraine. If you need to
include such animations on your website, you should provide a control
to allow users to turn off animations, preferrably site-wide.
Also, consider making use of the prefers-reduced-motion media feature
— use it to write a media query that will turn off animations if the
user has reduced animation specified in their system preferences.
Reference:
As suggested in the docs, you can give control to users to turn off animations. As a workaround user can use the MS Edge chromium-browser. Which is working fine.