You mix terms that in itself are in part not concisely defined: core, hardcore, AAA, third-party vs. casual, mobile.
In your initial post you say Switch can and should be played undocked, that's why it is not hardcore. But I disagree, undocked first and foremost means playing in handheld format, mobile gaming. You can play casual or core or hardcore games in that format. Would you say the Vita was a casual console because it was a handheld? And the Switch took over many gaming series from the Vita.
What it comes down to is: there are different kinds of players, with different needs and wishes. There is some use in categorization, as always, but no player will neatly fit in one category. the more needs and wishes a console fulfills, the more players are inclined to see value which can with the right marketing and price lead to a purchase.
Take me for example: I greatly enjoyed Elden Ring and Baldur's Gate. Am I now a core or hardcore player? For Elden Ring I used my newly acquired Xbox (not acquired for Elden Ring but Obsidian stuff), for Baldur's Gate my PC and am of the opinion that playing Baldur's Gate with a controller instead of mouse and keyboard is inferior, which in my eyes makes all console versions inferior. But at the same time I don't really care about graphics. I am not on the hunt for best graphic cards, which is why I don't play most AAA games on PC, as it is optimized for work and has integrated Intel graphics (*gasp*). I play mostly indies on PC, but also on my Switch. And I enjoy many of these pixelated, simple graphics indies a lot. I also play old games a lot, I am for instance looking forward to the Nightdive remaster of Dark Forces. And I also enjoy Mario Kart, Pikmin and some farming games. What am I now? A core casual gamer?
The reality is: I am a person and a gamer. And as such I have my personal needs and wishes for gaming. I see them matched with an unoptimized PC (unoptimized for gaming, I use it for programming mostly), a Switch and a Xbox. Other gamers have other needs. The reality is, Switch is matching a lot of needs. And so do other successful consoles.
MS did not only follow Kinect because of the success of the Wii. PS2 had massive success with games like Buzz and Dance Dance Revolution. Was the PS2 a casual console? Some may argue that indeed it was. And PS4 and PS5 have it's fair share of more casual experiences, which are enjoyed by a lot of people. If I look at the Xbox, the Store has categories like 'games for the whole family'. Any console that focuses on core or even harcore gamers alone is doomed to failure, as let's face it: purely hardcore gamers are only a few terminally online idiots. the majority of gamers have much broader needs and might switch from their COD-session to a round of Minecraft.
So why did the WiiU fail? Because it had a much too narrow focus. The Switch widened this focus a lot. Beyond core, hardcore and casual, because most palyers are far more than these labels indicate.