Deductions & credits

@LinaJ2018 thank you for your answer! I had a small follow up question to clarify the 5-year exemption when you first enter the US on an F1: does the exemption from counting days for SPT apply even if you switched over to an H1B? For example, if you entered on an F1 in 2017, but then switched over to H1B in 2020, would you file as a non resident for 2020 even if you met the SPT had you counted the days in 2020 that you were on H1B ? Or are you exempt from SPT till 2022 (2017 + 5 years) and would therefore file as non-resident till 2022 as long as you're a non-immigrant?