I am creating several dropdowns in a vertical layout group. Each dropdown overlaps the one below it when “expanded” (expanding the dropdown creates a new panel, which is a child of the dropdown button), but the draw order of the child dropdowns above is behind the dropdown buttons below it. I added a canvas element to each dropdown, and assigned each one a draw order using Override Sorting, which works in the editor - but when the game first starts, the sort order appears to be lost. If, while the game is running, I manually change the draw order and change it back to its original value, the dropdowns draw correctly from then on, so I assumed if I refreshed the canvas using ForceUpdateCanvases(), it would solve my issue, but it does not.
The solution to this problem is that not only do the parent buttons need canvas elements with sorting order set, so do the child panels (both also need graphics raycasters). I assumed the children would inherit the canvas from their parents, but that is apparently not the case.