By default, the platform does not have this option. You can use the following CSS code.
Please follow the steps below:
1. Go to BuddyBoss – Theme Options
2. Under Custom Codes, enable CSS
3. Append the following:
body:not(.logged-in) .dir-search.activity-search.bp-search { display: none; }
4. Save changes.
Screenshots
Without Code:
With Code: