I was, after much effort, able to get AoE2 HD to work to the point that I could test it. Clicking on the same target does NOT cause this bug, only when you attack a different target. (Original post can no longer be edited.) One of the reasons TheViper frequently experiences this bug is that critical shots are often against trebuchets, and he always attacks ground between multiple trebuchet so each command would be unique (for example, order attack ground, BBC start moving forward to be able to attack ground, and then 6 game seconds later just as they start to fire, another attack ground at the same place). Or against onagers, where you often need to attack-ground because the target is moving.
Furthermore, it seems like structures like castles might be affected by this bug! When manually targetting with a castle during testing for Gates are effective at blocking trebuchet projectiles, try doing it in your games, frequently switching to maximize the number of targets (since a monk without Sanctity should die to just two arrows so optimal switching period is just 0.1 real-time seconds), I found that clicking around the time a volley should start could lead to a delay before firing started, longer than the normal reloading between volleys.
If I tried to screen-capture this, I would get 5~10 FPS and it’s hard to tell what’s happening at 5 FPS, like where I’m clicking. So no video.
Edit: So the updated testing procedure requires being able to click relatively fast (when using Bombard cannons). I tried “move for over 6 seconds, press stop, then click a different target as soon as the bombard cannon turns and starts to shoot”, but it’s hard to reliably react since the turn doesn’t happen immediately. So it’s easier to just attack-ground the same area twice in a row, quickly. As long as you do it within ~0.1 sec, you’ll get the bug.
An expert player will have a sense for the normal reload timing: you get the exact reload period if you stop just before the reload and give an attack order. This contributes to giving attack orders about the same time as reload period finishes, and if that order is given after bombard cannons have been stopped for about 0.3 sec and start to automatically attack a target, it will cause this bug, at a greater frequency than if new attack orders were given at random intervals.
Or to put it a different way: you thought your BBC was going to fire at about time X. You gave it half a second; it did not fire, and enemy is about to shoot you and you need to move. The question: did it not fire because the reload is not finished (you underestimated X)? Or because you accidentally caused this bug (overestimated X) and interrupted a shot? If the second cause, then you might continue to wait because you think it’s the first cause, but your cannons will be stationary and inactive for another 5.5 seconds, plenty of time for them to die. So you move: and in doing so, unintentionally cause this bug because it really was reason 1, but because you aren’t aware of this bug, you try to shoot 2 seconds later and despite that it’s been 8 seconds since last shooting, the BBC doesn’t shoot (and won’t for another 4 sec).