First there are two possibilities arising from your question that are worth entertaining:
Your supervisor, with greater experience, sees some hidden value that you miss in the work. You acknowledge that the problem is important and such research problems are not typically solved within the context of a Masters. So perhaps your supervisor views your topic as a stepping stone towards some other result, or perhaps they view it more as exploratory and something for you to "cut your teeth" on.
You are correct and the topic is not going to (even indirectly) produce useful results and, furthermore, should not have been given to you as a Masters topic.
If (1) is even a slight possibility still, talk to your supervisor and express your concerns as strongly as you consider appropriate given your relationship. Having such concerns should be taken as you caring about your topic and the impact of your work and your supervisor should work to address them, even if only to tell you that the topic was a long shot and it is becoming clear now that the results are negative.
Aside from this, assuming your masters topic is a bit worthless and you are quite sure that (2) is more the case: what to do? Look to the longer term. Since you are a masters student, this is not the end of the world. If you wish to do a PhD and are accepted for the program, my advice would be to put your focus into that. Working on a masters topic you are embarrassed by is a difficult pill to swallow, and in an ideal world one you would not have to swallow. But doing PhD's is rife with such difficulties for all but a lucky few. And it is worth noting that your professor is also human and one of the hardest challenges of academia is to come up with new, worthwhile research topics; furthermore, the nature of research is such that there are no guarantees that a topic that seems initially promising will fulfil that promise.
In summary, my advice is: Do what you need to do to complete your Masters thesis and then look to get the best start/topic/supervisor possible for your PhD.
Regarding embarrassment about the Masters topic, again assuming the topic really is worthless, there are three things to note:
Anyone whose opinion has value will understand in the context of a Masters thesis that probably the topic came from the professor, not you, and will understand the difficulties you faced.
If you continue to do a PhD and progress further onwards into academia, in a few years time, nobody is all that likely to read about or care your Masters thesis (unless, perhaps, the results were published as a research paper).
The standard expected for a Masters thesis varies wildly from institution to institution, but solving an important research problem is certainly not to be expected. (I mention this because perhaps you have set very high standards for your thesis.)
Aside from all that, even though your Masters topic has not been great, probably you have learned at lot from pursuing it (about the problem itself, the other work done in the area, how it could be done better, how to conduct and describe research, how to avoid a similar dead-end topic in future, etc.). The main result of yours Masters is you (and what you learnt), not your Masters. Your Masters is one or two years of research; it is a gateway to potentially decades more research on the topics of your own chosing.