In Godot 4 a node's exported filepath property will be updated when you move that file! The inspector claims it to be a mere string but it is actually a "UID" (you can toggle to see it)
@ export_file("*.txt") var filepath: String
As a design change there are pros to displaying this as it's always been but I just spent ages trying to discover how to best @ export a scene as a UID when it was already doing that! That will teach me to go back and re-read patches notes instead of trying to wing it.