Deductions & credits

Sorry, no.  By your own story, the co-op stopped being your "principal residence" in 2020.  When you have two homes, only one can be your main home.  Whether the second home is kept for use as a vacation home, or for convenience when visiting the big city on business, or as a place to stay in case of medical emergency, it is not your main home and doesn't qualify for the exclusion.