The very first run for that file is working fine right…?
Just from there after you start to have issue with permission or file already open ?
Most probably Outlook is not releasing msg file once the code is entirely executed (The very first run).
I would recommend to copy msg file from shared drive to local drive with time stamp (HHmmss) and refer that to extract attachment. It should work as every time bot/outlook will be referring a new file.
You can also try to close the outlook once extraction is done for file (I hope Outlook will release the lock on that file at time of exiting/quitting)