Using the crop tool to extend the canvas (actually you're extending the layers) generates transparent pixels *unless* "delete cropped pixels" is selected. If delete cropped pixels is selected AND there is a locked layer labeled BG, it will generate a new BG layer filled with the BG color during the preview. Default colors (hit D) are black FG and white BG, they can be swapped by hitting X (before entering crop mode).
You're getting a black BG layer because your brush color (FG) is set to white... The preview layers are flattened when the crop is applied.
View attachment 96941View attachment 96944