You can define the drawing inside a function in the diagram file, then in the main file only include import only that function.
This way the diagram document will still produce an output but there is no page configuration seen by the main document.
Depends what you want to achieve with the diagram data in a separate file. Setting up the page and drawing a single diagram means that the diagram Typst file can be compiled to a single PDF with the diagram exactly as you want it to appear.
You’re right, of course, that setting the page is not needed by the main document. I’m not sure now what the ultimate goal is. Maybe you can give us the extra context @WiredMic.