Inset axis with non-transparent background

My question is essentially the same as this and this: I want to add an inset axis to an existing (main) axis, but the inset axis looks transparent and I can see the grid lines of the main axis through the inset.

The answers of the two mentioned posts involve inset_ax.elements, but when I run the code it complains ERROR: type Axis has no field elements. I am using CairoMakie v0.8.13 and GLMakie v0.6.13 and both gives error. I would like to know whether ax.elements is something obsolete and if so what’s the up-to-date way of accessing ax.elements / making inset axis non-transparent.

I think you can do translate!(insetax.blockscene, 0, 0, some_positive_value) now. The axis is not transparent, it’s just at the same z value as the other one.

This doesn’t seem to work.

Not with a high value like 500 or so?

I tried translate!(ax_inset.blockscene, 0, 0, 1000) and this does work. Thanks.