@Pratik Sheth Not sure its clear what you are asking. If your goal is to take the money and invest it anyway, then its generally better to do a 1031 that way you can differ your capital gain taxes in 2021 to a later date when you eventually end of selling the property. In theory you can keep doing 1031 forever until you pass the property down through will or other means. Bonus depreciation is to offset your taxes while you still own the property with something like Cost Segregation, when you sell it, all the depreciation will have to be recaptured to calculate the gain.
If you are contemplating selling it, take the hit on capital gains but then offset those gains with something else - you would do that if you can show corresponding loss (passive or active depending on whether you qualify as REP). To come up with this loss to offset the gains from this property, you potentially need another investment property. Your primary home unfortunately doesnt qualify as investment property.
If its not making sense, you might want to read these topics. Simple search will yield several good articles.