All about how boundaries are shown and how they interact.
The yellow dotted line is a layer boundary, size of the layer. You see that when the layer is active. You can paint / fill ..etc inside that boundary but not outside it.
The white dotted line is a selection. You can paint inside that, providing it fits inside the layer boundary. Anything outside the selection is ignored.
The red line is the path. You see that when the path has the visibility (eye) icon enabled. You can fill that or make it into a selection and paint inside providing the path fits inside the active layer.
A quick animation of those: https://i.imgur.com/rm1sHha.mp4
So to answer your question, why is the 'something' visible ? You really need those to navigate during editing. You can turn them off in the view menu - Show Selection / Show Layer Boundary and toggle the path visibility in the path dialogue.
The yellow dotted line is a layer boundary, size of the layer. You see that when the layer is active. You can paint / fill ..etc inside that boundary but not outside it.
The white dotted line is a selection. You can paint inside that, providing it fits inside the layer boundary. Anything outside the selection is ignored.
The red line is the path. You see that when the path has the visibility (eye) icon enabled. You can fill that or make it into a selection and paint inside providing the path fits inside the active layer.
A quick animation of those: https://i.imgur.com/rm1sHha.mp4
So to answer your question, why is the 'something' visible ? You really need those to navigate during editing. You can turn them off in the view menu - Show Selection / Show Layer Boundary and toggle the path visibility in the path dialogue.