"MinX", DoubleValue (0.0),
"MinY", DoubleValue (0.0),
"DeltaX", DoubleValue (5.0),
"DeltaY", DoubleValue (10.0),
"GridWidth", UintegerValue (3),
"LayoutType", StringValue ("RowFirst"));
mobility.SetMobilityModel ("ns3::RandomWalk2dMobilityModel",
"Bounds", RectangleValue (Rectangle (-50, 50, -50, 50)));
You place them in a grid which increases 10m on Y-axis (DeltaY) every 3 nodes (GridWidth).
However you specify that the node should walk in a rectangle that has max-Y 50. So, the 16th node will be placed outside of the rectangle.
Solutions: increase the area that they move and/or use a different position allocator.