Let’s assume we are playing a module AP whatever, as is. Assume too that you play it as close to “the book” as possible.
Yeah, if you can’t find the final boss due to a magic lock you can’t open without magic, your party of fighters might be SOL.
However with any homebrew game wouldn’t you...