Kids bikes take a beating in their life - it looks like the frame has been bent at some point so the OLD is now wider than the axle.
The threaded axle will have nuts on the end, probably flanged. I would crank down on these two nuts until the dropouts compress onto the locknuts.
Make sure the rear wheel still spins freely, and that the reaction arm for the backpedal brake still works as expected.
Don't adjust the locknut unless there's a bearing problem (wobble or binding or similar) You might choose to add a spacer bushing or some washers between lockbut and frame, but that's not ideal. Avoid allowing spacers to touch the wheel which will cause drag.
Aside - I see the J bends in the spokes are way out of position so this bike is for little kids only, probably with a weight cap of 15-20 kg. It may be possible to adjust the spokes, but given the amount of rust I'd expect them to be bound up and risk breaking.
On the positive, this bike has Been Around and probably served a bunch of kids as they grew up. It has done its job.
Why not washers to fill the space? Assuming this rear wheel is the one that the frame came with, then the dropouts should be parallel to each other when the locknuts are touching the inside of dropouts.
By adding washers, the dropout will be slightly kicked-out at the back, and the washers won't have firm contact all around.
Also the axle nut's flange will press in at the back before it touches the front, causing either the dropout to bend in the middle, or it may wedge in the slot and force the "mouth" to open.
All of this causes problems with keeping the rear wheel centered and in place.
This was my experience of cold setting a 26" frame from 5 to 9 speed without adjusting the dropouts, and the same taking a 20" from 6 to 8 speed.
Of course if this rear wheel is not original, and is narrower at the OLD, then a bushing or washer would be ideal. The photo in the question looks both angled out and curved, so the bike may already be a bits-bike.