In most instances, it is. There isn't a huge difference in sheer polygon-pushing grunt with the Switch 2 in handheld mode compared to Steam Deck. Yet once Nintendo's hybrid system is connected to its dock, the power gap increases significantly. When you compare both systems' internal components, the difference between the two portable machines is surprisingly small.
On the GPU front, the Switch 2 definitely has a slight edge over Steam Deck. Its Nvidia Ampere graphics solution is capable of delivering 4K/60 fps gameplay in games like Metroid Prime 4, mainly thanks to Nvidia DLSS (more on that shortly). The Deck's AMD RDNA 2 GPU isn't quite as accomplished, but it's still up to the task of handling Elden Ring at 720p/30 fps, which looks decent on the Deck's crisp and vibrant panel.
The Switch 2 can really pull away in power when docked. In portable play, the Nintendo console's GPU tops out at around 1.71 TFLOPS, which isn't much faster than Steam Deck's 1.6 TFLOPS GPU. It's a much different story with docked performance, where Switch 2 can draw up to 3.7 TFLOPS of compute power. This is a big reason why it can handle 4K gameplay. In contrast, the Steam Deck doesn't gain enhanced performance when docked.
Flipping to both handhelds' CPUs, it's the Steam Deck that has the advantage. Though the Switch 2's ARM Cortex-A78C processor has double the cores of the Deck's AMD Zen 2 chip (eight vs. four), the CPU in Valve's little system has a clock speed that can be cranked up to 3.5GHz. That's substantially faster than the 1.1GHz the Switch 2's CPU normally clocks in at.
However, the Switch 2's ARM-based processor is more modern than the Deck's Zen 2 chipset, so even though Valve's handheld can draw on higher clock speeds, Switch 2's CPU remains competitive performance-wise. Where Steam Deck pulls ahead again is on the memory front: it has 16GB of unified memory compared to Switch 2's 12GB.