I did some testing and ran a bit stuck. I did manage to get it to work, sort of…
The issue i had it wasnt checking the stored data in the correct order. I think i almost got. Need to do more test on this.
Also found an addon which can save 3dview positions. Im allowed to use parts of this code. I will try to add this functionality because i also find this behavior sometimes annoying. Especially when you go from edit mode or model into uv editor. It changes everything completely. When im in some model part and want to uv unwrap it, i want to see that model and not something complete different.