Setting aside the USNA issue for the moment, let’s say your Navy ensign or second lieutenant is graduated and commissioned.
Military members can request to have secondary dependents, see link below, and they become eligible for certain benefits.
If the military member is the acting parent of minor children and is essentially a single parent, similar to other military single parents, they have to come up with a care plan to ensure they remain deployable.
See:
If the situation is such that a military member sees no other option but to separate to handle whatever situation has developed, they can request a humanitarian discharge. If granted, they are separated, and any remaining service obligation forgiven. I dealt with many cases of these requests over my career. I still think about the mid-grade enlisted sailor I had whose wife developed ALS, and they had 4 kids under 10. He loved the Navy, was progressing well in his career, but he really had no other choice.
As for USNA, some of the dependency rules have changed in recent years, and they are more geared to being married or having kids, not secondary dependents. I’d have to go dig up the latest. It would have to be discussed with USNA and a determination made whether he could remain or would be separated, but very likely with no payback or recoupment, given the situation.
And let’s hope that scenario never happens!