Navy here. My ODS class between first and second year was overbooked so I had to find another time to go. Couldn’t find another good time during med school except towards the very end of my 4th year (finished my last 4th year rotation in January, went to ODS from Feb-March, had April off for completing random school graduation requirements, a 2 week vacation, and then graduated first thing in May). There was a government shutdown right before I left for ODS in February and it almost caused that class to get cancelled too. I was told if it did, my internship program would do something to substitute for ODS and send me to places to get the basic quals you do at officer training (fireman qual, swim qual, etc). Fortunately that did not happen and I was able to complete prior to graduation. It was actually nice going right before internship started because everything they taught me about basic navy things was fresh on my mind and pretty useful.
I went between M1/M2. There were many med students in the same boat, plus a handful going between M2/M3, maybe one or two between M3/M4 or after their intern year. Then a bunch who were going after their civilian deferment before going active duty. I know students in the class of 2023 who said that they couldn't get into ODS this summer back when it opened up in the fall of 2019, then COVID hit and any shot they had at the waitlist was lost. The Navy will have to be flexible going forward about when people fit ODS into their training due to the growing backlog.
Edit: this is Navy-specific. I also know Army med students who are completing their training on time this summer, so maybe Army folks can comment on the specifics of that.