I would like to play with my friend on the Xbox F1 2020, but I play on the PC and he, as I said, on the Xbox, but there's no crossplay. Is there maybe a program that "trickes" the game into thinking I'm an Xbox gamer, so that I can play crossplay?
Nope, no trick.
Find another game to crossplay.
https://www.digitaltrends.com/gaming/all-cross-platform-games/
Yes, create a programmer account on Xbox and drag the pc version into the programmer area. Linus tech tips has made a video about it