It seems like GitHub only detects the specific licenses if they are on the default (nowadays, main) branch.
Here's what I've observed just now
on my dev branch, the tabs next to README all read "License"
on my main branch the tabs next to README read their full license names (e.g. "MIT License")
on any branch, the licenses listed in the About section (top right) depended on the main branch licenses.
dev had licenses but main didn't, the About section would not list any licenses, but the tabs next to README would read "License".By "tabs" I mean these things: