BIP-340 specifies choosing the 02. Look at the section "Implicit Y coordinates"
so using code that doesn't check for it is wrong go read some source code of nostr libraries again with regard to key generation i'm not gonna pretend i checked the javascript or rust libraries, as i hate both of these languages but the Go libraries DO NOT CHECK just write a short piece of code generating new keys and then use two of them to make an ECDH key both ways then you'll know if the library is doing it right