Attack Move should always make the units selected attack while they going to a position.
However, if you click on a enemy unit / enemy building, the units act as if the command was a simple Attack (and not Attack Move).
The correct behaviour should be to just act as always in Attack Move, but using the current position of that unit / building as the move position. Ideally, this move position could be changed with the selected unit’s movement, but I guess that this could be tricky.