Not 100% sure but the filter being used in the snippet below may still work:
//Hide categories from WordPress category widget
function exclude_widget_categories($args){
$exclude = "1,4,8,57,80";
$args["exclude"] = $exclude;
return $args;
}
add_filter("widget_categories_args","exclude_widget_categories");
Just change the $exclude = "1,4,8,57,80"; to contain the IDs of the categories you want to exclude.
Reference to source: https://wordpress.stackexchange.com/a/253170