There is another post with simular issue, can my issue be related?
Ionic App not serving correctly on web after Ionic 5 to Ionic 6 and Angular 10 to Angular 13 migration (baseHref issue?) - Ionic Framework - Ionic Forum