I have an LWC component on the Lightning App Builder. I saw that we can use "Set Component Visibility" feature to hide the component but it only works for standard Record/User/Permissions related fields. I want to hide the component dynamically from the flexipage based on custom property. I have also seen we could use "<template if:true>" or "<template if:false>" but that will still occupy the space on the flexipage.
By "custom property" I assume you mean some property of the LWC itself rather than a custom field on your object. If so the only option is to wrap the template in a condition as you suggest at the end of your question. You are correct in saying this will leave a small additional vertical space where the component exists in the page but generally speaking this isn't particularly noticeable depending on the page layout.