Since the March 2022 update to ArcGIS Online, the ArcGIS Experience Builder Filter widget and spatial selection no longer work with MapServer type layers, but consistently work on feature service layers.
This issue is no longer reproducible with the latest version (June 2024) and the developer edition of ArcGIS Experience Builder 1.15. If this issue occurs, please contact Esri Technical Support.