How can I modify standard search query to include also ACF custom fields values?

I’m typically against using a bunch of plugins, but an option for you is to use the Relevanssi plugin. I use it along side ACF and allows you to search within those fields.

If you decide to use it, after installation/activation, go to the setting page for the plugin and scroll down to the “Indexing Options” section and under that there is a field called, “Custom fields to index”. You have a few options. Here’s the description from the plugin itself:

A comma-separated list of custom fields to include in the index. Set to ‘visible’ to index all visible custom fields and to ‘all’ to index all custom fields, also those starting with a ‘_’ character.

I typically set it to “visible” so it’ll search all of my visible custom fields.

Hope this helps.