You're allowed one medical redshirt, and one standard redshirt. After that, it's "use it or lose it."
You have 5 years to use up your 4 years of eligibility. You can be granted a 6th year if you petition for a medical redshirt.
He missed most of 2023, 2024.
One of those years counts as his standard redshirt. Neither can be used as a medical redshirt, since he came back to play at the end of the season. Thus, he has used up one year of eligibility.
If he doesn't play in 2025, then that counts as his medical redshirt.
He is certainly eligible in 2026 and 2027, regardless of what happens. He'd have to petition for 2028, if 2025 is considered a medical redshirt.