Not for commercial use without buying a license is a pretty standard licensing scheme. This has been worked out for decades.

The challenge is that this doesn't really work for community-developed software.

Let's say somebody uses this scheme for software they wrote. Would anybody else ever contribute significantly if the original author would benefit financially but they wouldn't?

Mediating the financial benefits through a non-profit might help, but (1) there's still a trust problem: who controls the non-profit? and (2) that's a lot of overhead to set up when starting out for a piece of software that may or may not become relevant.

And the shades in between account for the large number of new licensing schemes sprouting, with different restrictions on what is and isn't possible. (Not to mention the large number of "just used it anyways" instances). And it struggles for smaller utilities, or packages of many different things.

It's "worked out" in the sense that it still doesn't really work for a lot of maintainers.

What happens when the code is abandoned? Can I make my own changes whenever I want?

The problem with commercial software is the lock in.