How to kill all entities in a custom dimension?

Your selector selects entities outside of your dimension. You can use the distance trick to only select entities inside the specified dimension:

execute in minecraft:console run kill @e[distance=0..,type=!armor_stand,name=!MaximumCalamity,type=!item]

Or, you can use a predicate:

{
  "condition": "minecraft:entity_properties",
  "entity": "this",
  "predicate": {
    "location": {
      "dimension": "minecraft:console"
    }
  }
}

Paste this into a .json file, and place it into the correct folder path inside your datapack.

You can then select entities more efficiently with:

kill @e[predicate=namespace:predicate_file_name,type=!armor_stand,name=!MaximumCalamity,type=!item]