I'm not sure how it can detect that outside of trivial cases. Any object that is passed into a library function can escape the current thread, unless the compiler can analyze all the binary at once.
Though the vast majority of cases where ARC would come into play are of the trivial variety.
In Swift 6 this is only true if the value’s type is Sendable.