ID Software released the source code of their classic games up to "Doom 3: BFG Edition"[1] but it is unlikely that they will release the code for any of their newer games. I think that the reason is using a closed-source middleware owned by other companies in their newer titles.
Any modern AAA game even with its own engine uses one or more third-party middleware which hinders its release as an open source.