OpenAI struck a Pentagon deal to supply AI to classified networks, hours after Anthropic was banned in a high-profile dispute over safeguards.