The intent is that any roll of 7 through 12 means you lose the spell until your next level. And yes, it is a bit harsh! It's like that for a couple reasons:
1. As you level up, you get access to more spells, more magic items, more tools. I want to force players to rely on all the tools at their disposal, not just spam the same spell over and over again.
2. The alternative is "you can cast the spell again after a long rest" or "you regain your spells at sunrise" or something like that, and I don't want to incentivize players to sit around and do nothing until they get their spells back! I want players to constantly be pushing forward toward the next level.