By default, Relevanssi doesn’t un-include search results that are draft, pending, private, etc. This is problematic since you may not want products to be available via search.
This solution takes a product variation’s parent post status into account. If the variation’s parent in question is anything but ‘publish’ it de-indexes the product variation.
Add it to your functions.php and rebuild your index.