If a player opens there inventory and they have an active potion effect, then said potion runs out the inventory GUI does not shift back into proper position. Normally the the GUI is in the center and when the status effect is added it moves the GUI over to fit the status effect. But when it runs out it does not move back. The only way to fix it is to close the inventory and then re-open it.
This is intended. You do not want the inventory to jump around whilst you're working in it. It could result in the wrong items being dropped.