This seems to be a problem that even Swift can’t solve. The only languages that avoid this issue are ones with active GCs. Not that I don't agree and wouldn't love to see efforts made here.
It'd be possible to add an active GC to Rust. There are some library attempts at that: