Rule · Chapter 4
cr:4.4.2
First, the “beginning of the end phase” event occurs and effects that trigger at the beginning of the end phase are triggered. Layers on the stack resolve and game state actions are performed as if all players are passing priority in succession until the stack is empty..[1.10.2]