The Direct Answer
No — observing through closed glass gives poor results at any magnification above about 20×.
Ordinary window glass is not made to optical precision. At low magnification the distortions are subtle. At the magnifications needed to see Saturn’s rings (around 70×) or Jupiter’s cloud bands (100×+), even a spotlessly clean single-pane window introduces enough optical aberration to make planets look like smeared blobs. Add the thermal shimmer from warm indoor air hitting the cold glass, and the result is unusable.
The good news: the workaround is trivially easy. Open the window, step onto a balcony, or carry your scope outside for 5 minutes. These are faster solutions than debugging a poor view through glass. See below for the full picture and the best compact scopes for apartment use.