The disk size is playing an important role when changes in the disk needs to done. I feel that, the issue which you are facing might be possible due to the size of the new disk compared to the existing size.If you check the VI Client for this functionality and specify the new expected disk size less than the existing disk size, then the task executes successfully, without any change in the disk size.
So, I think the same might be happening at your end and the expected size is less then the existing size. Please modify the code with the variable newSizeGB and make sure that the condition,expected size is greater then the existing size,is being met.
Good troubleshooting idea and I added this to my code, but unfortunately it didn't fix it.
I was able to finally fix it though. It turns out the ode probably should never have worked. the VirtualDeviceConfigSpec (in my code's case, vdcsArray) has a parameter called operation. This needs to be set and the property operationSpecified needs to be set to true. Maybe in VI2.5, it defaulted to edit and now it doesn't, but that fixed it.