The HResult value for the IOException thrown from the CommonExceptions for ProcessCannotAccessFileInUse does not indicate that the file is locked.
See for error code reference: https://docs.microsoft.com/en-us/windows/desktop/debug/system-error-codes--0-499-
0x80070020 or 0x80070021 would indicate Sharing/Lock violations