Changing size problem

This is a complicated problem I ran in to working with GS, and I'm convinced its some kind of bug, which I seem to be finding a lot of in GS lately.
In my game, I have an actor (numberBlock), which is dragged into a box (collectBox) by the user. numberBlock does not exist when the game starts, it is spawned once you click on another actor (blockSpawnPoint). Clicking on blockSpawnPoint allows you to spawn many numberBlocks. Once the numberBlock is dragged into the box (collectBox), an attribute (numberCount) is incremented. When a numberBlock is dragged out of collectBox, numberCount is decremented, so that numberCount will always show the number of numberBlocks overlapping collectBox. However, once the amount of numberBlocks inside of collectBox reaches five, there is no room left for another numberBlock in the box. Therefore, I set a rule that shrinks the size of numberBlock if it is overlapping collectBox, and numberCount equals five or greater. If these conditions are not true, numberBlock will grow back to its original size. My problem is that my game requires the numberBlocks to collide with each other, and the Change Size behavior does not change collision size. So instead, I just used Change Attribute behaviors to change the size attribute within the numberBlock actor, that way the collision size would change too. However, once I have five numberBlocks in collectBox, they start to increase and decrease in size over and over again, and numberCount goes up and down extremely fast, and eventually just stops at 0, even though there are still numberBlocks in the box. Anyone have any ideas how to fix this? I even tried using interpolate, but that did not work either.
In my game, I have an actor (numberBlock), which is dragged into a box (collectBox) by the user. numberBlock does not exist when the game starts, it is spawned once you click on another actor (blockSpawnPoint). Clicking on blockSpawnPoint allows you to spawn many numberBlocks. Once the numberBlock is dragged into the box (collectBox), an attribute (numberCount) is incremented. When a numberBlock is dragged out of collectBox, numberCount is decremented, so that numberCount will always show the number of numberBlocks overlapping collectBox. However, once the amount of numberBlocks inside of collectBox reaches five, there is no room left for another numberBlock in the box. Therefore, I set a rule that shrinks the size of numberBlock if it is overlapping collectBox, and numberCount equals five or greater. If these conditions are not true, numberBlock will grow back to its original size. My problem is that my game requires the numberBlocks to collide with each other, and the Change Size behavior does not change collision size. So instead, I just used Change Attribute behaviors to change the size attribute within the numberBlock actor, that way the collision size would change too. However, once I have five numberBlocks in collectBox, they start to increase and decrease in size over and over again, and numberCount goes up and down extremely fast, and eventually just stops at 0, even though there are still numberBlocks in the box. Anyone have any ideas how to fix this? I even tried using interpolate, but that did not work either.
Comments
Collision Detection does not always mean Bounce off. It includes overlap. And I fully believe it is your problem here. Unfortunately there is nothing you can do since GS must fix the bug first.
Is there any workaround you can think of to perform this same action than would work?
edit-could I delete the actor being dragged and spawn a new, smaller one, or would that mess up my drag and drop function?