As far as Bitcoin’s consensus rules are concerned, the compressed and uncompressed keys for the same private key are separate keys.
The answer to your question is whatever the recipient’s wallet uses. Typically, the person who creates the address is also the recipient, so the sender doesn’t need to know or care about it. New software should generally only use compressed keys. This is because compressed keys are less time consuming.
Both are available in P2PKH. In P2WPKH, only compressed keys are allowed by policy. P2TR uses both different (x-only) types of keys.