Company overpaid me in 2022 but only fixed mistake in 2023

My company overpaid me in 2022. The total gross overpayment was approx $30,000.

I informed my company of this problem in 2022. The problem could have been corrected in 2022 but it wasn't. Instead, it was corrected in 2023.

I gave a repayment check in 2023 for approx $24,000.

Did I have too much Federal Income tax witheld in 2022 because of this? If yes, am I entitled to receive any of it back through a 2023 refund?