US President Donald Trump has weighed in on the dispute between the Pentagon and OpenAI competitor Anthropic over the use of AI software in the US military.