Get “Image CSS Class” value from the Advanced Options section

The Advanced Options section you are talking about the one in the Image Details, the modal that shows when clicking here:

enter image description here

that part is tinyMCE, its part of the tinyMCE editor, none of these fields are being saved in the WordPress database:

enter image description here

this is just and interface to gather data that will be set in the <img> tag, it uses JavaScript, the interface is populated when you click in the image if there is any attribute and/or data that was previously set there.

so you cant use WordPress functions to get those classnames.