Can caustic soda (sodium hydroxide) be used to dissolve urine odour?
Well, it would actually make things a little awkward.
Why do Vinegar and baking soda work?
The reason for the usage of vinegar or sodium bicarbonate must first be understood.

Vinegar ($\ce{CH3COOH}$) is an acid, and hence protonates the carbonyl oxygen present in urea[1].



$\ce{NaHCO3}$ (baking soda) is amphoteric, meaning it can react with both acids and bases. Urea is basic, and hence forms a salt. This answer on our site talks exclusively about the deodorizing property of baking soda.

Both actions are quite much the same, and prevent the hydrolysis of urea (which happens to release ammonia ($\ce{NH3}$) which is the &quot;foul&quot; smelling substance)

Why wouldn't sodium hydroxide work?
Not that $\ce{NaOH}$ wouldn't react, but because it would accelerate the hydrolysis of urea[2].



So if you're looking to stop the hydrolysis of urea (and the inevitable generation of ammonia) $\ce{NaOH}$ might not be the right guy.
What I wouldn't advise
But, hey, if you're looking to remove all the urea once and for all, you could pour a few buckets of $\ce{NaOH}$ and let the ammonia create a riot in your unsuspecting neighborhood.
What I would advise
Urea hydrolysis is catalysed by the enzyme urease (so it is dead slow without it)
From reference [3] (emphasis mine)

Urea is a stable compound with a decomposition half-life in aqueous media of 3.6 years. However, hydrolysis of urea is 104 times faster when the urease enzyme is present.

If we could inhibhit its action, we'd have got what we needed.
If you're wondering where urease comes from and why the dog urine stench is greatly enhanced in summer months, you're looking at the same answer: microorganisms.
It has been published that Metals and fluorides could be used to inhibhit urease. I quote further from source [3].

2.3. Inhibiting chemicals
Seven different chemicals, silver nitrate, zinc nitrate, sodium fluoride, glacial acetic acid, vinegar, citric acid, and sulfuric acid, were used to inhibit urea hydrolysis.

The list is by no means exhaustive.
From source 4, different classes of compounds which might be used:

The classes of urease inhibitors include: amides and esters of phosphoric acid, thiols, hydroxamic acids, phosphinic and thiophosphinic acids, boric and boronic acids, phosphate, heavy metal ions, bismuth compounds, quinones, and fluoride.

If you're not keen on purchasing baking soda, I'm sure you'll find any one of the above an interesting buy.

References:

Interaction of urea with weak acids and water, Prabhat K. Das Gupta and S. P. Moulik, J. Phys. Chem. 1987, 91, 5826-5832 DOI:10.1021/j100306a061

What is the reaction between NaOH and urea?

Characterization of urea hydrolysis in fresh human urine and inhibition by chemical addition, Hannah Ray, Daniella Saetta, Treavor H. Boyer, Environ. Sci.: Water Res. Technol., 2018, 4, 87-98 DOI: 10.1039/C7EW00271H

A combined temperature-pH study of urease kinetics. Assigning pKa values to ionizable groups of the active site involved in the catalytic reaction, Barbara Krajewska, J. Mol. Cat. B: Enzymatic Volume 124, Feb. 2016, 70-76 DOI: 10.1016/j.molcatb.2015.11.021



EDIT
There has been some discussion on if the stench is truly ammoniacal or is just bacterial odor. In that case, I would suggest sprinkling of significantly higher concentration of acid. Extreme pH is known to disrupt bacterial life forms and the acid will also prevent to a great extent the possibility of urea hydrolysis, thus preventing the odor anyway.