Steps to reproduce the issue:
- Run app in portrait mode, on a device with a display cutout
- Rotate device to landscape: the right edge of the grid appears cut off
- Rotate device back to portrait: the grid has excess padding on its right
Removing android:configChanges="orientation" from the manifest fixes the issue, as the Activity is then recreated on rotation.