Facing the same issue ... This is worked for me as a workaround -> Set an URL with an empty file path:
player?.url = URL(fileURLWithPath: "") // file URL with empty string prevents player from playing when app goes into foreground
This one also worked for me:
player?.remove()
Post
Replies
Boosts
Views
Activity
This also worked, call this once the VC get dismissed:
player?.remove()