What is the meaning of the unit that is written between parentheses alongside the dB unit? For example 2 dB (mW) or 2 dB (uW)? What exactly does this unit refer to? Does it refers to the unit of the reference value, the measured value (P2), or both?
dB is a measure of ratio, nothing more.
As such, if an absolute measurement is expressed in dB, then we need to know what the denominator of that ratio is.
For frequently used units, like dBm for instance, the string 'dBm' is a recognised standard way of expressing 'dB with respect to 1mW'.
Some writers baulk at combining dB directly with a unit, and so the practice has grown up of putting the reference level in brackets, for clarity, giving us dB(unit). Some people write dB(mW), it means exactly the same as dBm.
As a ratio, dB is dimensionless. The quantity expressed by dB(unit) will therefore have the same dimensions as the unit.
In some fields, it's not uncommon to see the unit being left off, which is very naughty, but unfortunately very common. I often read reports of sound having a level of so many dBs. You can usually guess what the default reference level is.