Whiteboard auto-alignment logic?

What is the logic on how the auto-alignment feature on whiteboards work? It keeps rearranging the objects on the canvas in a way that doesn’t match what I want, but when I reorder them and then press the auto-align button again, it messes up the order again.

Could you please record a short video showing this issue?

After some more testing, it seems like the main issue is the whiteboard prioritizes the order of when an entity is added to the canvas when using the auto alignment button instead of using the relative positioning of the entities to other entities on the canvas.

I think this might help explain it best:

Is there any way to influence the order the auto-align chooses, besides deleting the entities from the canvas and re-adding them to the canvas the order we want them stacked?