PIO Core 5 requires the latest Marlin code base. Check thread Marlin: Help me ERRROR ModuleNotFoundError.