Wrong occupation after conquering buildings
When setting occupation for buildings, e.g. 'Border areas' to 0, and attacking and conquering a hostile building, this results in only 1 soldier occupying the taken building. This is wrong, attackers should always occupy the attacked building, regardless of settings.
Not sure what you mean exactly. IIRC attackers occupy the building but the regulation as set kicks in which may eject soldiers again or maybe even cancel them from going in in the first place. Not sure what is more "correct". E.g. attack a barracks with 10 soldiers, have setting so only 1 stays in. Should all 10 walk in and 9 walk out again? This means they would be block longer

The near border setting is set to 0% I attacked the guardhouse with 4 soldiers I captured the building 1 soldier occupied it, 3 soldiers left
Expected: 3 soldiers occupy the building, 1 soldier left
When conquering a building, the maximum amount of attackers is stored, regardless of military settings. We had this bug some years ago as well, now its back :<
You mean the expected behavior is that the building is fully occupied with all attackers sent (until full of course)? So the regulation as per the settings only happens when the flag is connected to a warehouse?
Yep, exactly