Use gpresult to verify that the group policy has been applied.
https://activedirectorypro.com/gpresult-tool/
Capture stdout and stderr to verify that your script is be called and to see what messages it produces.
net use Y: \\myDC\SharedFolder 1>>C:\Windows\Temp\LogonScript.log 2>&1
net use G: \\myDC\TestFolder 1>>C:\Windows\Temp\LogonScript.log 2>&1