Assign instanceMatrix is not work

Previously, I was using WebGLRenderer and updating the instanceMatrix with

instanceMatrix = new InstancedBufferAttribute(bufferArray, 16);

without needing to update materials or similar operations, and my modifications were successfully applied.
image

However, now that I’m using WebGPURenderer, this method of updating instanceMatrix no longer takes effect; it only works after updating the material. Why is that?
I can modify instanceMatrix by
this.instanceMatrix.array.set(instanceMatrices, 0);
but I have to dynamically modify attributes, and the instance count after modification might exceed the original count. I cannot predict the maximum count in advance, so setting a fixed maximum count is not suitable. How should I resolve this issue?
Any assistance would be greatly appreciated.