For anyone stumbling on this thread like me, here is a shader working for Godot 4 doing the same thing.
https://godotshaders.com/shader/pixelart-upscaler-filter-2/