WHAT I HAVE DONE SO FAR:
1. I have disabled all the plugins on the website except WooCommerce,
WPBakery Page Builder, XTEMOS Post Types plugin, YITH WooCommerce Stripe Premium, YITH WooCommerce Subscription Premium, Yoast SEO
2. I have tested the feature with the WordPress default Twenty Twenty theme and it works
NOTE: The plugins work well with other themes that do not show that warning.
When you have two search forms on a page you would have two equal elements with the same ID. You need to remove the element from mobile view not to duplicate. If you need the search in the mobile menu, do not worry about duplicated ID, the functionality would work properly. just disregard this warning.