My UI adds buttons programmatically, and then attempts to unload them via queue_free() before adding new ones. Problem is, they don't unload in time to prevent the UI from breaking in an attempt to fit all the buttons (old, invisible, queued-for-deletion buttons and new ones).
The below solves the issue by essentially waiting out the frame, but is definitely not ideal:
yield(get_tree().create_timer(0.001), "timeout")
Is there a way to essentially wait until the next frame tick happens instead?