Investors & landlords

There are multiple CPA’s claiming that once you rent it out past the 3 year mark you cannot qualify for Pro rating of capital gains. Is this true?

what if you owned the house for 7 years, rented it for 3 years and it takes a month to sell which Results in you living in it for 23/24 months?