If this is a nested layout container (aka a layout container inside of another layout container) then the behavior for these containers was changed in a recent version. Previously nested layout containers were fully collapsible, but starting in 2018.2.0 nested layout will retain 30px of white space. This is the intended design, although I do not have any insight as to why.
However, there is an upcoming feature to show/hide floating layout containers when the user clicks a button may be an alternative solution. To track the progress of this feature, please see the following Idea Collapsible Layout Container Button
The Ideas section of the Tableau website allows customers to add, comment, and vote on features they would like to see in the product. Votes are used to help prioritize new features. Our Development team also loves to see everyone's use cases in the comments, which helps them better design features that will meet the most possible needs.
In the meantime, the answer is to not use nested layout containers if you need them to collapse completely.
If your view is not using nested layout containers, then I would need to poke at the workbook to provide a better answer.
Hope this helps!