So far, this applies to Halo Infinite and Battlefield 2042 (only 2 games I have that are cross platform according to Microsoft. However, this should apply all across the board.
If your having issues finding XBOX players in BF2042, you literally have to add players via XBOX Game Bar (same way you would add friends in halo).
Follow these instructions:
Add friends through Xbox Game Bar
- Press Windows logo key + G to open the Game Bar.
- Select Widget menu > Xbox Social.
- Enter the gamertag of the profile that you want to add in the search box, and then press Enter. Be sure to pay close attention to the gamertag’s spelling and spacing (and it seems to be case sensitive). (This should match up with their username / gamertag in game for both BF2042 and Halo: Infinite)
- Select Add friend (+).