Even if server side has been set a maxScale, this is not used and the layer remains visible (badly) even beyond that scale.
Perhaps if hideLayerAfterMinScaleDenominator is true, the layer should no longer be visible beyond maxScale.
An example server where maxScale is used (the same in QGIS works as expected):
https://servizigis.regione.emilia-romagna.it/geoags/rest/services/portale/prit2025/MapServer