Sharing ownership of coins via Multi-Signature transactions
Generally wallets don't recognize payments to random outputs, even if they're able to spend from them. In situations where multi-signature outputs are used, they're generally part of a scheme that the wallet knows about and participates in (for example 2-of-3 multisignatures where one of the keys is in your phone, one in a vault, and one is held by the wallet provider; usually the provider signs transactions you ask them to, but you can also spend with just the vault key).

This avoids the situation you're describing.