The solution is putting ion-content inside ion-segment-content, as the user Karbashevskyi described in this issue.
ion-content
ion-segment-content