VirtualHeightfieldMesh flickering when different world height is applied.

Hello, I’m trying to create a snow trail in Unreal Engine 5, it works pretty much the same way as the snow trail from this tutorial https://www.kodeco.com/5760-creating-snow-trails-in-unreal-engine-4

Both passes are subtracted and the end result is a displacement, obviously, this doesn’t work in UE5 so VHM should be used, however, when I plug in the output in the world height it works but it flickers, badly https://i.gyazo.com/a0b324f198d32804804278ef8ce6822d.gif
https://i.imgur.com/Uk5J92E.png

Is there a way to solve this?