When layering cameras you need to use the camera stacking functionality. This is because we do not guarantee the same buffer is used between cameras unless you are using stacking - it is working in your base case by virtue of luck because the temporary render texture allocator is returning the same texture for the base and UI, when you turn on opaque texture capture this chance is broken.
To resolve this issue set your UI camera to overlay mode and set this as an overlay within the base camera list.