Commanders from British armed forces have opposed any ban on transgender people serving in the military.
It comes after Donald Trump said that transgender people would not be allowed in the US military due to "tremendous" medical costs and disruption.
But British officials have supported people serving in the Army, Royal Navy and Royal Air Force.
Commander of UK Maritime Forces Rear Admiral Alex Burton tweeted: "I am so glad we are not going this way."
The Obama administration decided last year to allow transgender people to serve openly in the US military.
But in June, Defence Secretary James Mattis agreed to a six-month delay in the recruitment of transgender people.
Now President Trump has posted a series of tweets saying: "After consultation with my generals and military experts, please be advised that the United States government will not accept or allow transgender individuals to serve in any capacity in the US military.
"Our military must be focused on decisive and overwhelming victory and cannot be burdened with the tremendous medical costs and disruption that transgender in the military would entail."
In response, Rear Admiral Burton of the Royal Navy tweeted: "As a Royal Navy LGBT champion and senior warfighter I am so glad we are not going this way."
And Second Sea Lord Vice Admiral Jonathan Woodcock tweeted: "So proud of our transgender personnel. They bring diversity to our Royal Navy and I will always support their desire to serve their country.
"I suspect many who doubt the abilities of our diverse service personnel might be more reluctant to serve than they are to comment."
In February, the Army's LGBT champion, Lieutenant General Patrick Sanders said: "Only if individuals are free to be themselves can we release the genie of their potential."
Each of Britain's armed forces welcomes transgender people to serve.
The Ministry of Defence told the BBC that President Trump's tweets were "an American issue".
A spokesman added: "We are clear that all LGBT members of our armed forces play a vital role in keeping our nation safe. We will continue to welcome people from a diverse range of backgrounds, including transgender personnel."
BBC defence correspondent Jonathan Beale said the MoD would not provide the number of transgender people serving in the British military, but that one source had told him there were fewer than 10.