$execute store result score .red temp run scoreboard players get #red_players game$(map_id)
$execute store result score .blue temp run scoreboard players get #blue_players game$(map_id)

$execute unless score #red_players game$(map_id) = #blue_players game$(map_id) unless score .auto_balance settings matches 0 run return run function pctf:logic/lobby/late_join/uneven_teams
function pctf:logic/lobby/late_join/even_teams