Opening the book…
Unmanaged solutions merge into the target's default layer and become effectively un-uninstallable. Managed solutions keep a clean layer you can service and remove.
Export --managed for test and prod. Keep the unmanaged source in dev (and in source control via pac solution clone/sync), and treat the managed zip as a build artifact.
Your own throwaway dev sandbox can take unmanaged imports — that is what it is for.
Microsoft Learn — Managed and unmanaged solutions — Layering model behind this rule