Beam energy dependence of the squeeze-out effect on the directed and elliptic flow in Au + Au collisions in the high baryon density region