Syncs with https://github.com/godotengine/godot/pull/68701. Breaks compat slightly by reordering member variables.