What's the best soundproofing solution to rubber coming off of double-paned transom windows?
The &quot;rubber&quot; falling out could be weatherstripping but is most likely the window gasket.

Example above is just one type, not your type.   But the gasket locks the window into the grooves around the wood.   The provides weather tightness with some very mild sound absorption abilities.
The fact that these windows look to be under an underhang means that the rain probably won't get through, bad gasket or not.   So for now it is aesthetics and slight insulation.
To replace these you might as well have a window or glass company come out and do the repair on site or to get brand new frames/windows.   Either way there will need to be some disassembling of the trim/window.
You could bypass that by gluing weatherstripping around the window frame and if you can get a slim band to look good - that could easily work for the short term.    More of a craft project.
Any sound issues you have, have almost zero to do with this.