The only solution is not to change 512-byte sector size unless you have particular reasons to do so. Or you can create a virtual file system in non-PnP mode.
When I set "SectorSize" to 4096 and "StorageType" to "stDiskPnP", some applications can't work with such disk. Why?
In PnP mode the OS builds a stack of drivers on top of CBFS virtual disk driver (the one that is presented in PnP mode). While this driver reports sector size to be 4096 bytes, some drivers in the stack change this value back to 512 and the file system driver, which sits on the top of the stack, gets the value of 512 bytes. Now when the application works with files in non-buffered mode, it aligns data to 512 byte boundary, but the drivers below the filesystem driver expect 4096 byte granularity, and deny file operation requests.