EDIT:
I am now noticing this error in my logs:
wordpress_1 | [Mon Jun 20 20:10:45.307306 2022] [php7:warn] [pid 35] [client 172.23.0.1:59486] PHP Warning: Invalid argument supplied for foreach() in /var/www/html/wp-admin/includes/plugin.php on line 1779, referer: https://localhost:8082/wp-admin/edit.php?post_type=event-custom
and here is the specific function from that file:
function remove_menu_page( $menu_slug ) {
global $menu;
foreach ( $menu as $i => $item ) {
if ( $menu_slug === $item[2] ) {
unset( $menu[ $i ] );
return $item;
}
}
return false;
}