I have tried a lot of repair methods for fixing a bad window on a Miata and seen many others tried. The only one that will work for sure is a new window. But in order to order one, you have to know who made the top. It is still a lot of work. A place that repairs the windows will charge just as much to replace the window as it will to replace the complete top in labor charges.
So my solution was to replace the complete top. For me it is four to six hour job, depending on the condition of the rain rail. This problem (the rain rail) is easily gotten around by ordering one with the rain rail already attached. But these are more expensive and if installed using alternate methods maybe an unnecessary expense. I say this because a good part of the time for installation is the separating of the rain rail from the top and reattaching it to the top is not needed to reinstall the top.