Select all land/naval military units hotkey inly selects land units

I play Age of Empires 2 DE on steam and I have been facing this bug consistently 100% of the times ever since I downloaded the game for 2 years in every patch.
The issue being that the select all land/naval military units hotkey, which I have on shift+x, does not select naval units, if I have land units. It selects naval military units only if I have zero land military unit.
Any help is appreciated.