Just to add some more data for what works and doesn’t:
– the acf/settings/select2_version filter doesn’t help
– I also tried acf_update_setting('select2_version', 4 );
which didn’t work either
– I am using WooCommerce, and it’s WC’s select2 which gets enqueued
– when attempting to add a new repeating field set in a form in admin I get the same js error as reported by others
– reverting to ACF 5.5.11 resolves the issue