> You cannot use this module to access a mapped drive in another Ansible
task, drives mapped with this module are only accessible when logging in
interactively with the user through the console or RDP.
What you are meant to do is just use the UNC path and use become on the task that needs to access that UNC path so the credentials are delegated. If you need to use 2 separate credentials you might be able to make it work with win_credential like
- name: run tasks with become to access the cred store
 become: yes # Required so you can access the cred store
 become_method: runas
 vars:
   ansible_become_user: '{{ ansible_user }}'
   ansible_become_pass: '{{ ansible_password }}'
 block:
 - win_credential:
     name: server1
     type: domain_password
     username: user1
     secret: password
    state: present
 - win_credential:
     name: server2
     type: domain_password
     username: user2
     secret: password
    state: present
 - win_command: robocopy \\server1\share\folder \\server2\share\folder