diegesis is the property that a story element is meant to exist in-world, as opposed for example to being a constraint imposed by the way the thing was made, or something intended to communicate to the reader/viewer/listener/player rather than the character
in most games (with some notable exceptions), opening a door is diegetic, reading "door unlocked" in the HUD is non-diegetic, and dying to the trap behind it and coming back to life is in some ambiguous place in-between that it's best not to dwell on.
anyway dungeons that have puzzles in them are fucking weird because modern UX principles are all over the things. very often the only way to solve a puzzle is by starting from the assumption that it was meant to be solvable and that the clues are nearby, and thinking about what types of things the game designers might have intended to communicate to the player. the harder the puzzle is, the more of this kind of thought is required.
this stands in notable contrast to puzzles like in Sokoban or whatever, where you are intended to have to actually work at it for quite a while to get the details right, even after having had all the critical insights. games, even puzzle games, aren't really about that anymore. almost nobody enjoys solving puzzles that are actually hard on their merits. this is not necessarily good or bad, though it's frustrating for us since we do, but it's how things are right now.
games where there's modes of play that aren't puzzle-solving are particularly bad about this. all the puzzles have to be solvable in themselves or after unlocking or figuring out no more than one key mechanic, or else, well... just imagine the complaints. (it's okay to have mechanics that build on each other, they just need to be spaced out many hours of gameplay apart!)
this means that for the player, the experience of traversing a puzzley dungeon is one of reading communication that has been intentionally obscured, but not very obscured. nowhere near as bad as even the simplest riddle, more like the stuff you'd see on the back of a cereal box, where it's only difficult because the audience is children. (do cereal boxes still have that stuff on them these days ...?) ... so all the difficulty winds up being incidental difficulty, points of confusion the game designers tried and failed to eliminate.
for the character, meanwhile, they're somewhere they were never intended to be. there is every reason to think that traps are not intended to be passable, that combat is not intended to be winnable, that broken devices cannot be repaired, and so on.
notably, if progression were gated by character logic that logic would be something along the lines of: somebody lived here, the room layout must make sense, this corridor must have gone somewhere that somebody needed to be. that is a kind of communication with the environment that the character might engage in.... but none of it works. the environment is never structured in a way that has character logic. never, ever, ever. that would be in conflict with communicating with the player.
so like... is it "real"? surely it seems absurd to suggest that the character is "really" perceiving themselves to be moving through an entirely different room layout than the one the player sees them moving through. arguably it is even absurd to imagine that the character is approaching everything as a puzzle, as something which it is definitely possible to solve.
it's probably best to ignore this stuff, just like it's best to ignore the confusion of whether the character "really" died. it isn't a good game if you dwell on it too much. the problem is, when you have to think so hard about it to solve things, it's hard to ignore it at the same time!
oh well. it's weird.
