Error when adding Meta Boxes, but only when adding 3 with the same callback

instead of deleting and creating a new box, try this to just move the existing boxes

add_action("add_meta_boxes_post", function () {

    $listBoxId = [
        "tagsdiv-ahtscollectionmakes",
        "tagsdiv-ahtscollectionyear",
        "tagsdiv-ahtscollectionos",
    ];


    $screen = get_current_screen();
    $page = $screen->id;

    // loop on the "side" boxes
    foreach ($GLOBALS["wp_meta_boxes"][$page]["side"] as $priority => $tabPriority) {
        foreach ($tabPriority as $id => $box) {

            if (in_array($id, $listBoxId)) {
                // creating new box in "normal"
                $GLOBALS["wp_meta_boxes"][$page]["normal"][$priority][$id] = $box;
                // remove the former box
                unset($GLOBALS["wp_meta_boxes"][$page][$context][$priority][$id]);
            }

        }
    }


});