They are lot of scenes where a camera goes through glasses:
Well there is no particularly significance in these shots, they are just done in a director's vision & style.
About a year ago I binged all the movies after not watching them for years and yes, I noticed there were a lot of these shots. Every movie/series will have a theme and a style and the following subsequent movies will follow the same. One of the best example I can give is Marvel. Their movies feel and look kinda same.
These shots were more in the first few movies but from Order of the Phoenix, these shots got less and I don't remember there being any in last two movies. From the 5th movie, David Yates took the direction helm and he bought his own style to the movies. One thing is short scenes of newspaper articles telling the audience what is happening. You can see these scenes in David Yates’ one.
My personal opinion? Glass acts as a natural barrier separating one person from others; despite being able to see each other through transparent glass, there's an even more poignant feeling of disconnectedness from seeing the life that you want but not being able to reach for it. A theme throughout the film, Harry's feeling of isolation despite having many friends in Gryffindor pervades the entirety of the series moving forward; this is evidenced strongly in this movie when Harry waits alone in the clock tower, watching his friends leave to go to Hogsmeade, while he's stuck alone without written parental consent (for obvious reasons; he kind of blew up his own great aunt).
As the audience, we can freely move through these barriers, but Harry experiences seclusion, and director Cuaron capitalizes on this idea at every opportunity:
- Harry alone in his room practicing his spells
- Harry alone psychologically as his foster family lets Marge insult his dead parents with complete complicity
- Harry alone walking the streets at 3am before getting picked up by the bus
- Harry completely on his own to discuss underaged magic use with the Minister of Magic
- Harry being allegedly singled out as the sole likely target of "mass-murderer" Sirius Black, according to Arthur Weasley
- Harry the only one to faint from the Dementors; being ostracized by others and tormented from Draco for fainting
- The only one who could hear a woman screaming when near the Dementors (his mother, who died for him; most other students haven't experienced or seen the death of a loved one... this is later expounded in 6 when he and Luna see and discuss the Thestrals)
- The one to get the Grimm in divinations class, separating him from the rest of his class
- Getting singled out by Hagrid to meet and ride Buckbeak
- Having the Bogart turn into a Dementor, the worst one out of all of them, probably, compared to tapdancing spiders and sneks.
- McGonagall and Filch refusing to let him go to Hogsmeade with his friends
- Dementors targeting him and none of the other players during Quidditch Gryf vs Sly
- Needing to sneak into Hogsmeade using invisibility and marauder's instead of walking there normally like everyone else
- Eavesdropping the conversation where he learns that (allegedly) Sirius Black betrayed his parents; resolving to kill him, which is an extreme act of hatred
- Solo hunt for PP; getting castigated by Snape, who seems to particularly hate him out of all the students at Hogwarts
- In an empty classroom with possessed Trelawny reciting prophecies in the weirdest voice imaginable
- Believing that his only mentor who's looking after him, Remus, is betraying him for Sirius
- Placed into the impossible position of needing to attack / disarm a teacher, Snape
- Finding out the real truth that his parents' betrayer is still alive, but not Sirius, and then promptly losing him
- Attempting to fight 20 Dementors at one time, 20-on-1, to save Sirius' soul
- Waking up in the hospital thinking that everything is lost
- Forced to summon a strong Patronus to save his own life and the life of Sirius during his timey-wimey adventure
- Watching his favorite mentor leave the school permanently and his new father figure escape, though still a wanted convict.
He's been abused by and now has severed from his foster family, and that continues to haunt him throughout the film; but his ability to form strong friendships with Hermione, Ron, and Hagrid, acquire caring mentors in the form of Remus and Sirius, and a loving relationship with Ginny in the later films is key in distinguishing himself from Voldemort, who's feared by most, loved by only a very select few crazies.
Ideally, like Luna says, Voldemort wants Harry to feel as unprotected and cloistered as possible to make him weak, and this film is setting these things up perfectly. Harry already feels like a freak even among the Wizarding community, with strange prophetic things happening to him and robed creatures of death hanging over his shoulders making him alienated and paranoid. It would be easy for Harry to capitulate, particularly after Cedric's death; or, corrupt his heart to avenge the murder of Sirius. But because of his love of his friends that deepens in 4 and 5, and the guidance of people like Sirius, Remus, and Dumbledore, he's able to establish meaningful connections and let those connections reflect his virtuosity, instead of allowing Voldemort to poison his core beliefs in righteousness and camaraderie.
Windows aren't the only motif, though, that's quintessential here. Mirrors are also incredibly important. While transparent glass windows depict a world that Harry wants but can't yet grasp, glass mirrors reflect the inner torment and fears that characters have, which is essential to the bogart scenes, as the bogart reflects Harry's fears back at him. This gives glass an introspective complexity beyond being a divider between him and his friends/community.
It is a homage to Citizen Kane.
This film, often said to be the greatest film of all time, used groundbreaking special effects. The most famous of which was to show a camera passing through a window - a skylight - in a continous tracking shot. The trick was kept secret for a while and it gained the film some publicity.
Ever since, dozens of films have added a tracking shot that passes through a window. Although nowadays they don't need the trick of a flash of lightning to hide the removal of the glass. Possible the most recent example is Good Omens, which uses exactly the same tracking shot to enter Aziriaphal's bookshopt.