These new F cpus require a bios update even on the z390 to run so need to make sure the motherboard you get has a label/sticker indicating bios update has been applied.
Also same goes for any 9th gen cpu on 300series board below z390 ie z370, H370, B360 and H310 need bios to support 9th gen applied. New stock of these boards should have the correct bios but make sure incase it's from an old inventory.
9400f (no igpu) is only slightly faster vs 8400 almost identical. Both are 6 cores. The i3 is only a 4 core cpu so id give that a miss.
Theoretically without igpu on 9400f would see bit better cooling but not significant.
Imo be worth going for 9600k instead for the higher frequencies and a z390 motherboard.