Now, regardless of whether the player is attacking or defending, a window appears in front of him with a choice - to retreat, take part in the battle in manual mode or use autoresolve. IT is IMPORTANT that at THIS stage the AI can no longer make a decision to fight or retreat. In this way, the player can introduce additional reinforcements into the battle, achieving a numerical advantage and then start the battle. This is illogical - it turns out that time seems to freeze for the player, giving him the opportunity to bring reinforcements and only then decide whether to join the battle or not, and the AI does NOT seem to SEE these reinforcements. I see TWO solutions - either to prohibit the player from introducing reinforcements into the battle at this stage, or to "teach" the AI to make a decision to retreat if it sees that reinforcements are coming to the player.
Of course, nothing prevents the player from starting a battle, and introducing reinforcements on the first move is just quite logical and looks like a military trick - to deceive the enemy into thinking that he is fighting with a small detachment. However (and this is important!) reinforcements introduced into battle will not participate in the pre-battle alignment. In addition, the terrain and dense formation of units on the battlefield may not allow all reinforcements to enter the battle at once - this also looks logical and historical.