This was originally a comment but it might serve as an answer:
The important thing here is your adviser to be happy with the work you have done.
If the adviser is happy with the work, even if you think it's shallow, it doesn't matter a lot given that your adviser will write a good recommendation letter so that you can be admitted to the PhD program. Of course a good publication can help, but it is not always necessary.
I understand that you might think that a master thesis is a "preparation" for the research you will do during your PhD. At least in my field, you won't dive immediately in research during your PhD. You will have a lot (depending) of time to study related material that you feel you missed because you should/could learn that on the Master thesis. From my point of view, you won't have any problem given your motivation.
So, I suggest, try to make the best out of your current thesis, while talking at the same time to your adviser about potential issues regarding your PhD application. If they are happy with your work, it will be reflected with a good recommendation letter which is the key for getting into a good PhD program.