Optimizing a device configuration implicitly means optimizing the central region. The electrodes are semi-infinite, and are therefore not supposed to change (they are supposed to be optimized before the device is created). Therefore, it makes no sense to add vacuum around the device. However, what you can do is to optimize the central region: Simply use a GeometryOptimization block. It will relax the central region only, while keeping the electrodes fixed as needed for NEGF calculations.