Battery cameras can not be installed behind a window/glass if you want to use the "Motion Detection" feature.
Battery cameras use PIR (passive infrared) motion detection, an energy-efficient (saving battery power) technology that captures motions by detecting infrared radiation (radiant heat) emitted or reflected by objects. When the camera is mounted behind a window/glass, infrared radiation does not pass through the window/glass. As a result, the "Motion Detection feature" does not work reliably. If you want the camera to detect motions outside, it is recommended that you mount the camera outside.
For plug-in/wired cameras, the answer is yes, as they use camera video analytics rather than PIR sensors to detect motions. As long as they "see", they can detect motions. So you can mount the camera behind a window/glass with confidence.