The current behaviour for hiding looks like the below:

The correct version should look similar to the below.

This issue happens since when hiding the view, the correct implementation is to remove it, an hiding animation should be run on the hidden view before removing it.