- [x] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
- [x] I have checked the [FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.

### Steps to reproduce this issue

1. start provider and consumer
2. provider return `MetadataInfo`
![image](https://user-images.githubusercontent.com/43994656/128314936-2b517524-50ac-465d-b378-119dfea24c78.png)

3. consumer received `HashMap`
![image](https://user-images.githubusercontent.com/43994656/128314994-637476b8-ef78-4107-8b14-c8e25c06d67c.png)
4. error 
```
java.lang.ClassCastException: java.util.HashMap cannot be cast to org.apache.dubbo.metadata.MetadataInfo
	at org.apache.dubbo.common.bytecode.proxy0.getMetadataInfo(proxy0.java)
	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.doGetMetadataInfo(ServiceInstancesChangedListener.java:331)
	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.getRemoteMetadata(ServiceInstancesChangedListener.java:285)
	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.onEvent(ServiceInstancesChangedListener.java:136)
	at org.apache.dubbo.registry.nacos.NacosServiceDiscovery.handleEvent(NacosServiceDiscovery.java:143)
	at org.apache.dubbo.registry.nacos.NacosServiceDiscovery.lambda$null$4(NacosServiceDiscovery.java:122)
```
5. It should be caused by the serialization whitelist. I removed this change and the call is normal.  #8386

@Override
    public SerializerFactory createSerializerFactory() {
        SerializerFactory serializerFactory = new Hessian2SerializerFactory();
        String whiteList = ConfigurationUtils.getProperty(WHITELIST);
        if ("true".equals(whiteList)) {
            serializerFactory.getClassFactory().setWhitelist(true);
            String allowPattern = ConfigurationUtils.getProperty(ALLOW);
            if (StringUtils.isNotEmpty(allowPattern)) {
                for (String pattern : allowPattern.split(";")) {
                    serializerFactory.getClassFactory().allow(pattern);
                }
            }
        } else {
            serializerFactory.getClassFactory().setWhitelist(false);
            String denyPattern = ConfigurationUtils.getProperty(DENY);
            if (StringUtils.isNotEmpty(denyPattern)) {
                for (String pattern : denyPattern.split(";")) {
                    serializerFactory.getClassFactory().deny(pattern);
                }
            }
        }
        serializerFactory.getClassFactory().allow(RuntimeException.class.getName());
        return serializerFactory;
    }
}