This has been an issue for at least a couple of weeks now.
I play Overwatch 2 through Steam, and whenever I type in any kind of in-game chat, I (and my Steam friends) see my Steam name rather than my Battle.net name. Everyone else not on my Steam friends list sees the name [[unknown]].
Likewise, any Steam user that is not on my Steam friends list will appear to me in in-game chat as [[unknown]].
The name [[unknown]] does not appear anywhere else; if you right-click an [[unknown]]'s name in chat, you can see their career profile with their Battle.net name. Similarly, their Battle.net name displays on the scoreboard and elsewhere. It only seems to be in the chat that [[unknown]] appears.