Mohsin That expression checks equality; it doesn't synchronize the two names. If a later preferred_username no longer matches openvpn.commonName after lowerAscii(), validation will fail when the expression is evaluated.
Whether client configuration needs changing depends on what supplies that common name. The configuration reference defaults to common_name; when using username-as-common-name, it says to select username for that purpose.
Could you confirm your openvpn.common-name.environment-variable-name setting, whether username-as-common-name is enabled, and the OpenVPN/openvpn-auth-oauth2 versions? That would clarify what needs updating without assuming certificates must be replaced.