Thank you for your reply. Unfortunately either I didn’t understand it correctly or it isn’t accurate. I’m posting my finding here, hoping to help others.
We have found that there are 2 more files that need to be changed, for the search function to work correctly on custom fields. Those files are:
wp-content\themes\woodmart\inc\widgets\class-widget-layered-nav.php
wp-content\themes\woodmart\inc\widgets\class-widget-price-filter.php
The changes to those files are the ones that I described in my first post.
Moreover, we needed to change this $where = str_replace( ')))', ") OR ({$wpdb->posts}.ID IN (" . implode( ',', $search_ids ) . "))))", $where );
to this $where = str_replace( ')))', ")) OR ({$wpdb->posts}.ID IN (" . implode( ',', $search_ids ) . ")))", $where );
because some search results were partial.
If someone wants to extend this template to be able to search within other custom fields (apart from sku), these are the changes that need to be made.