It’s not both ways. Free distribution is not the same as ownerless, which is the point I was making. If I release a piece of source code under an open license, unless that license states otherwise, I retain the copyright. I’m the legal author of the work.
That’s not to say that the author can retract the work. They can’t. But — assuming they retain full rights, either by being the sole author or by using a contributor agreement and being careful with component libraries — they could choose to not release the next version under an open license.
Whether it’s advisable is another issue. It’s the author’s right to do so.