Data structure resets every round

I have the following device, my game manager, which should keep a profile for all players.

player_config := class:
    InventoryLevel:int = 0
    Score:int = 0

reset_items_device := class(creative_device):
    var PlayerConfig: [player]player_config = map{}

OnBeginRound() : void=
    Print("Found Config {Config.Score} {Config.InventoryLevel}")

During the round i modify the map, and it appear as if the value has been modify, but on the next round, im back to default values of 0, 0

Any idea why?

It seems OnBegin is invoked every round … which resets the map

OnBegin<override>()<suspends> : void =
    set AllPlayers = GetPlayspace().GetPlayers()

    for:
        Player : AllPlayers
        Player.IsActive[]
    do:
        if:
            set PlayerConfig[Player] = player_config{}

In creative when a round is finished it more or less resets everything in it. Some exceptions are with some options provided in the round settings device regarding keeping items and if classes are set to only reset on game end instead of round end. Other than that it’s like starting everything again.