Paid too much estimated tax because of end-of-year loss harvesting

Hello,

 

Last years I made regular estimated taxes to match 100-110% of 2021 tax to avoid underpayment penalty. However, stock market did not do so well (I made lot of trades) and so at the end 2022, I did loss harvesting (sold at loss). Final capital gain ended up much lower than I anticipated at the beginning of the year. I'll get a significant refund (because of the prepayment) but anyone in the same boat? Any issue/auditing concern? Any good strategy going forward to avoid a huge swing from year to year?