IMO the example you provided is an anti-pattern.
There are better ways to avoid deeply nested code, but it depends on the programming language.
I try to make each method/function to have a single entry and a single exit.
Cond, case, pattern maching in function heads, decision tables, and syntactic sugar in some PLs, allow you to flatten the nested code / branchinbg / conditionals.
Instead of :
Now I write: Exit early makes the code easier to read and understand