F1 visa expiring same day as final exam 😭 what now?

My F1 visa ends on June 9th and that’s also the last day of my exams. I can only fly back to India on the 11th to renew it since I’m continuing my course. Is that okay or am I in trouble? Someone pls explain how this works :smiling_face_with_tear: