Nope, Fox chose WWE over UFC.
UFC signed a deal with ESPN way before the WWE stuff was finalized. At that point, people were just hearing rumors of Fox execs showing up at WWE shows.
Basically, neither side was completely happy with the previous deal.
UFC is in the middle of a ratings slump, and they've gone as far as following the Fox model was going to take them. No one is tuning in to FS1 for much of anything, let alone The Ultimate Fighter or the UFC studio show they had.
ESPN just happened to have a better positioned deal on the table since they were looking for ESPN+ content when UFC was shopping their rights.