Thank you for this! I just tried it out but unfortunately Godot throws an error on await get_tree().idle_frame : Invalid get index ‘idle_frame’ (on base: ‘SceneTree’).
Could it be because I’m running in application mode, which only refreshes the screen if there’s an update?
As an alternative, I’ve put the code to turn things off into its own function: