Gamma Correction and Shadow Detail bit allocation

I’m having slight difficulties understanding how a gamma correction increases details in the shadows(where our eyes are more sensitive). Once the bits have been been reallocated to the shadows after applying an INVERSE GAMMA/GAMMA CORRECTION in the camera wouldn’t all that detail just be lost as the monitor would apply a GAMMA to counter the inverse gamma thus bringing the image luminance back to a linear function. Or are the code values saved after gamma correction and only the brightness is brought down.

I’ll use an example I took from the video “Diving into dynamic range” from Filmmaker IQ on youtube.

From what I understood, in his example he uses an 8 STOP(the triangles represent the stops) camera with an 8 bit depth(Not exactly sure about this I got abit confused here. Please correct me If I’m wrong)

enter image description here

enter image description here

Basically once the GAMMA of the screen is applied to the above OETF GAMMA curve and it goes back to the LINEAR one why wouldn’t we loose all the details in the shadow again??

‚Äč

Here’s the link to the video just in case: https://www.youtube.com/watch?v=2sshGdMgJxQ