Chrome 133 now supports the moveBefore function which preserves the state of a DOM element when it is moved. I believe Firefox intends to support this at some points too, I'm unaware if Safari is planning to implement.
This would be great to have in MorphDom. For example, it would solve phoenixframework/phoenix_live_view#2889 which was raised in the LiveView repo.