You have to perform them on several repetitive command blocks but better is to use a datapack. Here is the video, I noticed that in 1.21.5 this issue is now not occurring with “/data” but there is still the discontinuity with “/item replace entity @s contents with ice”.
Create the dummy scoreboard:
/scoreboard objectives add CompteurTicks dummy
My graphics are set to "fancy", but I tested with "fast" and "fabulous" too. None of them fixed it
Can confirm in 1.21.5 😕