Home sale when file Married filing separately

5 years ago my wife and I bought a house for $200K and lived in it, primary home and meet ownership test. In 2021 we sold the house for $600K. How do I handle the $400K gain?

1. If we file as Married filing separately, do I claim selling price as $300K ($600K/2) - expenses/2 in each file or 

2. I must switch from MFS to Married filing Jointly to account for the total $400K gain in a single file

 

Is #1 a viable option ?