Being “afraid of being trapped” in a sea kayak is a frequent fear of people who have never practiced a wet exit, or been unexpectedly dumped when out in one even before practicing. The reality is that gravity works even in water. The issue when you find yourself upside down in a kayak isn’t that you won’t get out but that you have to fight to stay inside it if you want to roll back up. Unless you have a really tight neoprene spray skirt that you have to forcibly yank off (which is why they have a grab loop on the front), in most cases you will naturally fall out of the kayak, sometimes before it is even completely inverted if you have a not-too-tight nylon sprayskirt that fastens under the coaming lip with bungee cord .
It takes some training and experience to react by “grabbing” the underside of the deck with your knees and thighs to fight gravity and stay in the boat if you know how to roll. Most popular modern kayaks have larger keyhole coamings than the old whitewater and earlier small cockpit sea kayaks. Some higher end sea kayaks still have smaller ones, but they can still be wet exited easily with practice. Whenever I have had kayaking instruction, the first exercise is always having us capsize the boat and then climb back in on the water. I have NEVER seen a student fail to simply fall out of the kayak or easily pop themselves out underwater if by some slim chance they stayed int the cockpit until it was upside down.