Age of empires 2 (2013) game freezing when any sound starting

I have AoE 2 HD Edition (2013) steam version and when I click any unit, the game freezes before the unit sounds. The game freezes almost a second everytime I click a villager or any other unit with sound. But it never crashes. I used -dxlevel80 or any compability settings on Windows 10 such as disabling full screen optimizations and overriding DPI scaling but they don’t work. I also used dgVooDoo 2 DirectX wrappers, it does not work as well.

Any help appreciated. Thanks.

Note that I tried every version that the steam provides on the betas tab.

Edit: I somehow managed to increase the game performance by setting up some launching options but the problem is still annoying.