Does lateral stability decrease during transonic flight? If so, why?
Ideally it would not. With increasing Mach number the lift curve slope of the vertical tail goes up proportional to the Prandtl-Glauert factor $\frac{1}{\sqrt{1-Ma^2}}$ while the destabilising fuselage as a slender body is mainly unaffected by Mach effects. But that is only theory which assumes a perfectly rigid body.

In reality, elasticity decreases the effectivity of the vertical tail. Higher loads lead to higher deformations which in turn decrease the loads and with them the stabilising moments. What happens in detail depends on the structure: A light aircraft will experience decreasing directional stability as dynamic pressure increases.

At supersonic speed, fin effectivity is further reduced by the now again decreasing lift curve slope as Mach increases further. Now even the rigid aircraft experiences decreasing directional stability and elasticity will reduce stability further.



Directional stability over Mach, from Ray Whitford's Fundamentals of Fighter Design