Upgrading dissolve shader

Godot Version

4.3 stable

Question

I found this cool video about making disslove shader.

But I have a problem with it. If I using UV of sprite then it looks broken Due to the fact that the uv of the sprite changes during animation.
If I will use screen UV like on video it looks better but not good enough, because when camera moves screen UV moves too.

Is it any solution?