The agreements with the technology companies come amid the Defense Department’s dispute with Anthropic.