Heikki,
I see your problem...

but an easy answer is not in reach...
The rubber window channel is designed (as you know) to fit over a relatively thin body panel.
The thickest I found, and used, was for a 3/4" panel.
In other words, the rubber gasket, once installed, forms both the exterior and interior trim.
If this is the plan, and you want to add to, but not change the window design, I think I'd use a thin strip of black flexible material, maybe aluminum or plastic, inside the cut to cover the styrofoam.
It would have to butt up against the rubber, or be just slightly larger.
Then on the interior, a nice wood frame just slightly larger than the window opening to cover the edge of the thin material.
I'm off on a camping trip, back Sunday.
Rob
PS.
After you make your cutout for the windows, install the rubber, then make a template for the glass.
Then use dividers or some other tool to re mark the line 1/8" smaller, or the glass will never go in...
Waiting for "someday" will leave you on your deathbed wondering why you didn't just rearrange your priorities and enjoy the time you had, instead of waiting for a "better" time to come along...