security – UNC vs Physical path on Windows

I develop Windows application that write data to file located on filesystem.
I have 2 options to reach the filesystem:

  1. Physical path: C:FolderMyfile.txt
  2. UNC Path (Configured RWX MyShare): MyShareMyfile.txt

When using UNC path, we sometimes receive “unexpected network error occurred”.

I am wondering if UNC and Physical path is using different drivers/kernel modules/security layers internally in the OS?

On linux when you File.Open or File.Read, it depend on the filesystem type, each filesystem will have different implementation, you will go through different security layers. Is it the same on windows?

Questions:

  1. When using UNC / Physical path, do we go via different drivers / seucity layers?
  2. When Using UNC, Could it be Endpoint protection/Firewall/Antivirus might add additional security layer?