H1b Cap Exempt to H1b Cap subject after completing 6 years

Hi Experts,

I’m working on H1b Cap Exempt visa for the last 6 years (6 years getting completed Nov-22). My green card is already filed and I have approved I-140 with a priority date Oct 2018.

My question is can I file for the lottery cap-subject next year in 2023? I have heard that I can’t file as I have already completed 6 years on H1 and if I want to file then I have to go to out of US for a year (cooling period).

Thank you