I think the pictures will explain the problem better.
1, wofi config hide_search=false
2, wofi config hide_search=true
3, wofi config key_hide_search=Tab
Picture for the situation:
img to 1 https://justpaste.it/aopy6
img to 2 https://justpaste.it/ft794
img to 3 https://justpaste.it/dxpp8
As can be seen in situation 3, the search is nicely hidden.
In situation 2, it will be hidden but an ugly empty space will remain.
Can this problem be solved in the configuration?
If not, would it be possible to fix it without much intervention in the code?
No, it cannot be fixed with a config option. In fact the way that was setup wasn't quite right. So I fixed it e59e3f58117b. This fix has the added benefit of allowing you to un-hide the search with key_hide_search ...which should've been how this behaved from the start.