I think J J has it right here (broken clocks etc.). The President could easily issue a statement while he's out of office saying that "effective the second I'm reinstated, the following Cabinet officials are dismissed" or something like that.
Also, I'm pretty sure that if the VP really tried to do that despite Congress clearly not wanting to get rid of the President, they'd eventually impeach the Vice President. Invoking the 25th Amendment a second time would be such a blatant and gross act of powergrabbing that Congress would probably be ticked that its input was ignored.
That could be, though with the bar being 2/3 votes in both houses, you could certainly have a scenario where solid majorities would vote against the president, but not quite enough for the amendment’s requirements.
This is all notional anyway. It would basically never happen. I was just curious about what law would say about such a thing.
Well, this would be how it would play out:
1. The President declared unable by the VP/Cabinet.
2. The President declares he is able.
3. Congress meets.
4. Congress passes the "Presidential Sanity Commission Act," which established a body to make the determination with Vice (now Acting) President. This could even be a joint congressional committee. A majority favors it.
5. Vice (now Acting) President signs the law.
6. Less than 2/3 of the House and Senate think that the President is unable to continue, but a majority does.
7. At this point, the President has full power, and fires all Cabinet that tried to remove him.
8. The Vice President, at the same time, with "Presidential Sanity Commission" declares the President unable to serve.
At that point, the President can declare that he is fit, we have a repeat of steps 3-6. However, when the President returns to power, there is no person to fire. He can't fire the Commission. He can't fire the VP. The only thing the President can do is take it back to Congress, and the process repeats. The president says, "I'm able" and the VP/Commission says, "No, your not." At that point, they could just photocopies of the documents through each cycle.