EntityField-related elements don't save position in state
EntityField, EntityFieldKeys, and EntityFieldType don't store their relative x position in the state. Instead, its position is calculated during runtime after loading the diagram. This is fine for the editor (except you can see the element positions change a split-second after a diagram is loaded), but this causes issues when exporting the diagram to an SVG because it doesn't run any calculations. The x position of the elements need to be saved in the diagram state, preferably so we don't have to load them relative to the other elements.
I'm also noticing that the scale of some shapes seem to be off. The editor uses 0.75, and the diagram presumably uses 1, but some elements aren't being scaled correctly.
Diagram as it appears in the editor:
Exported SVG: