Robustness of surface mounting daughterboards
I suppose what you suggest should work, but I've never seen a definitive statement to that effect by someone who has actually studied this.  My logic is that castellations are half of a thru-hole pad.  If half of a pad can hold the board well enough, adding a second half should hold it even better.

However, this is not a area where I would trust simple logic like this.  I would do one of:

Use headers.  These are soldered to thru hole pads on both ends.  That is using the headers and both boards as intended, so really has to work.  This is the "correct" way to connect something rigidly with thru-hole pads to another board.

Replicate the whole circuit on the new board.  If you're designing a board from scratch to hold a module, you can incorporate the module's circuit on the new board directly.

This is only valid when you know the circuit, are legally allowed to replicate it, and the module doesn't have certifications you are relying on.  For example, if you are incorporating a WiFi module into your circuit, its FCC certification would not apply to your replicated circuit.