This command is found in
Image>View/Show Layer Boundary.
This option toggles the yellow visual dotted line that denotes a
layer within the image window. It is merged with the image border
when the layer has the same size as the image window. This line is
usually not visible.