Masks and clipping
A mask shows the layers under it only where the mask is. Select the mask shape and what it should show, choose Create mask, and the top layer becomes the mask. It stays a layer you can move, edit and animate.
Step by step
Select the window and the view
Drag a box on the canvas from the wall's top-left corner across the window. It selects every layer it touches: the window and the sea view behind it.
Create the mask
Click Create mask in the Layers panel's top bar, second from the right. The top layer, the window, goes into a Masks folder inside a new Mask group, and the view now shows only through it.
Select the mask
Click Window in the Layers panel, inside the Masks folder. A mask isn't drawn itself, but it is still a layer: its box shows where it is.
Move it
Drag inside the window's box on the canvas, to the right. The window moves over the view, which stays where it is: give the window's Position a track with and it pans across the view.