OpenSearch 2.17: search is slow

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OpenSearch 2.17 on AWS

Describe the issue:
OpenSearch was updated from 2.3 to 2.17 on AWS for our project.

Since the update we found the search is slower, some queries run more than 10 seconds, against 1 or 2 seconds maximum before.
Additionally, for some queires having synonyms appended, we met the error: too_many_clauses, it was not present before the upgrade.

Another project uses Solr, it’s upgraded from Solr 9.5.0 to 9.7.0, we met similar problems.

Does the change of Lucene versions from Lucene 9.9.2 to 9.11.1 is the cause of the slow queries and the too_many_clause error?

Configuration:

Relevant Logs or Screenshots: