@Vivek123 I see that you have changed to https for keycloak, I’ve seen cases where mixing http and https causes issues. Can you set up https on OpenSearch Dashboards and update both of the config files (config.yml and opensearch_dashboards.yml).
Also, to ensure the certificate is not causing any issues, would you be able to extract the certificate from the browser when you connect to keycloak and save it under: pemtrustedcas_filepath (see similar case here)