Possible outputs of the Solidity compiler include creation bytecode and deployed (runtime) bytecode. However, this compiled deployed bytecode might not be the same as the one that will actually be deployed on the blockchain. This might be the case if the contract requires constructor arguments to initialize immutable variables. So, how do I use the mentioned artifacts (creation bytecode, deployed bytecode, constructor arguments) and generate the actual deployed bytecode, without actually deploying it. One possible option is to deploy to a (local) testnet and then see the deployed bytecode, but this seems like an overkill.
Ok, to make things clearer, this is the nomenclature (I didn't make it up: What is the difference between bytecode, init code, deployed bytedcode, creation bytecode, and runtime bytecode?):
deployed bytecode = runtime bytecode
actual deployed bytecode = actual runtime bytecode
This question concerns the fact that it is sometimes the case that:
deployed bytecode (as predicted by compilation) =/= actual deployed bytecode (after deployment)
In fact, the last formula generally holds when a contract uses immutable variables.