To put it in context, this is North America map, normal speed and I'm fighting an IA. I used my artillery to bait the enemy garrison out of the city and put my 29 stack in between to protect my arties, but they just walked through each other and nothing happened. This is not the first time I had this issue but this time I managed to catch it in time before my artilleries got destroyed.
I didn't test it thoroughly but after a few incidents my theory is that this only happens when two conditions are met:
1. The two armies must be moving (if my front line army is stationary they do engage).
2. Both armies cannot have each other as their objectives (enemy army's objective was my artilleries in the back and my army's objective was a point in the map).
There's a 2019 thread that I think discusses the same bug but apparently it hasn't been fixed. I already reported this but I want to know if this has happened to someone else.