Make a 3D printed block or out of wood with a hole at the desired angle for the flag pole. Clamp it to the inside of the window frame using a length of threaded rod that spans the width of the window. The threaded rod will push the block against the window frame by making it push from the opposite side of the window.