I am unclear on what a “static animation” is. That seems rather more like a static image, or static HTML/CSS/JavaScript.
If you are not developing the animation—this was posted in an area frequented by third-party app developers—I can ask that this question be moved to a macOS forum for whichever version of macOS you are using here. Which macOS are you using? Ventura? Monterey? Something older?
If this isn’t your own animation but something hosted at some website that you are visiting, then it is distinctly possible the content isn’t rendering correctly, and you’ll either need to start to debug this and then discuss this with the website maintainer, and/or with Apple.
If you are developing this animation—you had referred to “my animation” in your posting, and posted in a developer-focused area—then check whether the Safari web inspector is reporting JavaScript or CSS animation errors, update the Mac involved to Ventura to get the latest version of Safari, check for updates to your particular JavaScript and/or CSS animation tooling—whatever tooling you’re using to generate these animations, and whether the tooling supports Safari—and then check with the WebKit folks.