If the USSR tested a nuke, they might still be way behind in the number of nukes and the means to deliver them. So after a single test, the US could theoretically nuke Moscow without fearing a nuclear counterattack.
I do agree that the US would be very hesitant to do so.
As a pure thought experiment, let's say the USSR tests in 1949 as in OTL in defiance of the ban. The US makes the grave decision and nukes Moscow justifying it as an act of self defense because the test is a declaration of war. The USSR is ordered to surrender unconditionally or more attacks will follow.
What happens next?
The USSR didnt surrended unconditionally even when the Nazis were stomping it and at the gates of Moscow.
Not even Adolf "Russians are subhumans that need to be exterminated" Hitler asked or would had asked unconditional surrender to the Soviets, his terms were everything North of the Urals.
What makes you think a way stronger USSR is going to even consider accepting terms worse than the Nazis just because a flashy bomb was used?
What would happen? The USSR would be very pissed and the US has virtually given up any moral claim in Europe, excepr maybe in the UK, say bye bye to US occupation in Germany.
Each time the US insist in bombing the USSR, each time the USSR will retaliate by taking more and more of Western Europe and Asia.
Either the US cut their loses and leave, having given an edge to the Soviets or this turns into Unthinkable, the result of which will be the US folding and the USSR gaining whatever demand they want.
Now, make no mistake, it is not that I think the Soviets were unbeatable, far from it. I believe pound per pound the US can defeat the Soviets. The problem is that the US would simply not have the stomach to put the body count needed to bring a brutal dictarorship like the USSR to its heel. The reality is that only Hitler and Stalin could beat each other in a total war. The US is not going to put 5-10 million dead for geopolitical gains, no way. The moment the US starts to need to pay an even remotely prohibitive blood price, the moment they will sack Truman, go away and allow the Soviets to do whatever they want in Europe and Asia.
What if the plan from the start is to use the SU as the meatshield in WWII
This is exactly what happened in OTL, it only succeeded in giving the Soviets the strongest most experienced ground force on Earth.
This was planned and was called Operation Unthinkable, which was never done because it was considered suicidal.
Had it happened the Soviets would win, having way more troops in Europe. While the nukes would hurt, it wouldnt bring down a continent sized power. In the end the Wallies would fold and make peace, because while they materially can win, the US-UK is not going to put the multi million bodycount needed for this.
In the end everything up to the Atlantic has a shiny red color in Europe (only the UK remains free and US allied) while in Asia everything up to the Home Islands also have this shiny red. The USSR is now way bigger, stronger and with the resources that might allow it to win the economic Cold War.