If you do it like you show, without any modifications, it will be the unrelaxed configuration. Study objects are not designed to be used sequentially in the same script.
However, it is easy to use the relaxed configuration instead. Just insert this line between the two study objects:
device_configuration = optimize_device_configuration.result()