Modifying World Max build height and min

Hello, I pregenerated a world with Larion world generation mod, and I removed it (and limited the world so no new chunks can generate) How could I potentially make a datapack to keep the world set to -128 min and 512 max, since I wont be generating new terrain, it shouldnt be an issue?

Here is my code, I tested it in a single player world and a world with larion and it doesnt work, any help would be appreciated.

{
  "ultrawarm": false,
  "natural": true,
  "coordinate_scale": 1.0,
  "has_skylight": true,
  "has_ceiling": false,
  "ambient_light": 0.0,
  "min_y": -128,
  "height": 640,
  "logical_height": 640,
  "infiniburn": "minecraft:infiniburn_overworld",
  "effects": "minecraft:overworld",
  "bed_works": true,
  "respawn_anchor_works": false
}
Continue to help post