Exact entanglement dynamics mediated by leaky optical cavities. (27th May 2020)