How to add a paint effect to the ground

Godot v4.2.1

I’m trying to achieve an effect similar to bopl battle where the character paints the ground it walks on.

Bopl Battle Trailer

I’ve tried many things and nothing worked sadly, I need something that works with a moving camera and optmized for multiple characters so a viewport and spawning particles/sprites doesn’t seem to work.

The best result I had was using line 2d and creating an infinite trail but everytime the character jumps I have to create a new Line 2D node to cut the trail and it’s not optimal either.