You could stack two female headers, if the upper one has suitable pins. (0.64 mm square cross section or such.) That would require that the two boards are held together mechanically by other means, of course. If the connection is not meant to be taken apart often, that should work.
If you find a female header with extra-long pins ("wire wrap" style), you could also mount the header spaced away from the PCB. But I am not sure whether suitable spacers (with holes a t0.1" pitch) are available. Depending on the number of units you need to build you could 3D print someting. Or, if the plugging operation does not have to be very robust, you can get away with some simpler spacer which just defines the distance during the soldering step, or with no spacer at all.