I had a Miracast connection problem with a Surface Pro 2 - recently resolved.
Between my friends and me, we have 3 Surface Pro computers and no matter what we tried 2 of the 3 would not connect to our smart TVs via Miracast even though other computers and devices would. Among other things, we ran diagnostics, including sfc, dxdiag, et al, with no issues found and, yes, we tried removing the TV from the available device list but the SP computers still would not connect; so, while our problem differs from yours, I wonder if the solution may be useful for you.
Do you live within access distance of a Microsoft Store? I ask this because, fortunately, I do live within a couple of hour's drive of one. After trying to resolve this for several weeks, with great suggestions and assistance on the Microsoft Forums, it remained unresolved until, at the suggestion of Barb Bowman on the forum, I made an appointment and drove to the closest Microsoft store.
The tech there was just as baffled as the rest of us but, after 20 minutes of unsuccessfully trying everything he could think of, he went out back and retrieved a USB thumb drive that apparently contained some form of system (not specific to Miracast) diagnostic/repair script, and he ran the script. This took another 20 minutes and when it completed, he told us to wait another 5 minutes at which time the computer would reboot - and it did.
After that, Miracast worked properly, and it has been working flawlessly ever since. Although your Miracast issue differs from yours, this approach may work equally well for you as there may be a corrupt file or configuration setting that needs fixing - but, the problem is that script provides no report of what was found and 'repaired'.
I can tell you that among other thing(s), the script did make change(s) to the firewall settings, as I had to make a change to the firewall when I got home so my multifunction printer software would work. He did not even tell me if there was a name for that script and apparently it is not available for download.
So, while running it resolved my own problem, it provided no information to pass along to others, including my friends that live 6 hours away from the closest Microsoft store!