Logging is not happening after migration to Elasticsearch version 8

We have desktop application that we deploy on VMware Horizon. The application was able to write logs on Elasticsearch server (version 7.*).
Now it is planned to upgrade Elasticsearch server from version 7 to version 8. To make it work with new version, we had to modify below line in the client-side application code-
old code - AutoRegisterTemplateVersion = AutoRegisterTemplateVersion.ESv7
Updated code - AutoRegisterTemplateVersion = AutoRegisterTemplateVersion.ESv8

After making the change, when I run the application from my local system, I can see logs on Kibana. but when the same application is deployed on Vmware Horizon and run, no log is showing on Kibana.
FYI, on the application (client side) we are using Serilog.Sinks.Elasticsearch 10.0.0.0. Can you please suggest what is cause of the issue and how can it be fixed?