Opensearch Upgrade Failing

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): opensearch-1.3.6

Describe the issue: I am trying to upgrade opensearch from 1.2.3 to 1.3.6. But,It’s failing with below messages

Configuration:

version: '3.2'
services:
  opensearch:
    image: opensearchproject/opensearch:1.2.3
    deploy:
      mode: global
      placement:
        constraints:
        - node.labels.opensearch == true
      restart_policy:
        condition : any
        max_attempts : 3
    networks:
      - opensearch

    volumes:
    - /apps/opensearch/conf/:/usr/share/opensearch/config/
    - /apps/opensearch/conf/opensearch.yml:/usr/share/opensearch/config/opensearch.yml
    - /apps_data/opensearch/:/usr/share/opensearch/data
    - /apps/opensearch/conf/opensearch-security/internal-users.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/internal_users.yml   
    - /apps/opensearch/conf/opensearch-security/config.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/config.yml   
    - /apps/opensearch/conf/opensearch-security/roles_mapping.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/roles_mapping.yml   
    - /apps/opensearch/conf/opensearch-security/tenants.yml:/usr/share/opensearch/plugins/opensearch-security/securityconfig/tenants.yml

networks:
  opensearch:
    external:
      name: "host"

Relevant Logs or Screenshots:

Enabling execution of install_demo_configuration.sh for OpenSearch Security Plugin
OpenSearch Security Demo Installer
 ** Warning: Do not use on production or public reachable systems **
Basedir: /usr/share/opensearch
OpenSearch install type: rpm/deb on NAME="Amazon Linux"
OpenSearch config dir: /usr/share/opensearch/config
OpenSearch config file: /usr/share/opensearch/config/opensearch.yml
OpenSearch bin dir: /usr/share/opensearch/bin
OpenSearch plugins dir: /usr/share/opensearch/plugins
OpenSearch lib dir: /usr/share/opensearch/lib
Detected OpenSearch Version: x-content-1.3.6
Detected OpenSearch Security Version: 1.3.6.0
/usr/share/opensearch/config/opensearch.yml seems to be already configured for Security. Quit.
Enabling OpenSearch Security Plugin
Killing opensearch process 33
OpenSearch exited with code 143
Performance analyzer exited with code 0

Looks like issue with starting version 1.3.4. I am not able upgrade 1.3.3 and after that any later version giving the same error