Firefox print preview showing blank space for display flex

mat-tab-body-wrapper mat-tab-group {
  display: flex;
}

This works fine in Chrome and Edge but Firefox and Safari it’s creating additional space before the table. If I change to display: block then it’s working.

Is there a way this can be fixed with flex style?