How to exclude “uncategorized” from custom categories widget?

It’s hard to say from your code. The exclude_tree parameter of wp_dropdown_categories()
is pretty undocumented in codex. It’s making use of get_categories() which does not list it at all.

If you don’t have children within that category, you can consider to use the exclude parameter instead / additional. Just give it a test if that works. This might save you the hassle to deal with some bugs in wordpress in the end. WordPress is not very well in handling hierarchy over the last years.

Some background info: Beta 2.8.2 – wp_list_categories buggy hierarchy – Ticket #9999; With wp_list_categories child categories not excluded when parents are excluded – Ticket #8614