Your commander is about to be relieved by higher authority, and knows it. You've heard rumors, but you've not actually seen any orders or been formally advised of the situtation. She tells you to issue a contract to FlyByNight Paving, to repave all the roads on the post, along with the parking lots, motor pools and the post runways. What do you do? What are the ramifications of letting that contract if it turns out that she had no authority to issue that order? If you do let the contract, is the contract itself enforceable by FlyByNight?
Is this the bar exam? Like many things, it would be complicated, touching on both civilian and military law. Short answer, her Commanding Officer IS her Commanding Officer until relieved of command. If it was her responsibility to issue such a contract (of course you know that with the GSA, that's not they way things work on base, but it's a hypothetical so we'll let it slide), and she did so in good faith, then yes, the contract would probably be upheld, irrespective of any looming changing of command, rumored or otherwise.
However, if she were aware or reasonably should have been aware that there was something "improper or illegal" afoot between this contractor and your commanding officer, things could get very sticky and there would be multiple issues that would need to be litigated. How it would turn out, would be anyone's guess.
Think of it this way, the Pentagon doesn't restart it's ongoing procurement negotiations, or nullify any existing contracts every time there's either a new SOD or POTUS, do they?
Our scenario is worse than your hypothetical. The roads are already being paved and continue to be paved and it looks like the rumors of the commander being relieved are unfounded. How do you get rid of this commander in your analogy? He’s there by the force of law, even if those forces are messed up.