Yes. NFC tags can be scanned through glass. As long as the phone can reach within the tags scan distance it will be fine.
Just be aware that NFC doesn't like metal so it's best to avoid placing the tag close to a metal window frame.
Seritag - 11 Jan 2023