Finally, this actually worked partially.
There were two issues here. Finder kept moving to various spaces randomly and is one of the most severe defects I have seen go unresolved in any software product. Second issue was that that tab on that finder window also reset to first tab so that not only you dont know which space now your window has floated onto, the tab you were working on just 40 seconds ago is now reset to first tab and you have find and click the tab that had your files you had to work in.
The above workaround at least ensures your tab does not get reset. But now if I click finder icon in the dock, instead of taking me to the finder window I was working on, it just opens a new finder window in a default folder rather than taking me to the finder window I was working in and the tab with folder containing my working files. But if i click on finder second time it does take me to original finder window which is not bad.
The issue of window floating around also does not happen anymore it seems. So this is not a bad workaround. It gets rid of most of the issues it seems. Maybe it was always like this in previous OSX windows and we did not notice.