Oh I found the answer in someone else's reply on the godot shader's website
To make work with Godot 4 change line 9 from
uniform sampler2D u_dither_tex;
to
uniform sampler2D u_dither_tex : repeat_enable;