GPT doesn't see sen2cor masks

Hi,
I would like to subset and extract a mask from a L2A generated by sen2cor. The mask belongs to the scene classification, namely the mask “scl_cloud_high_proba” placed into the folder “Masks” in the “Product Explorer” panel.

By using the GUI, I apply the Resample to 10m, then with Band Math create a new band including into Expression simply the name of the mask: “scl_cloud_high_proba”. After that with Export I can save only the new band e.g. as GeoTIFF.

In GPT it is not possible to do so, because the mask band “scl_cloud_high_proba” is not recognised.
I did various attempts and in the simplest gpt script I “Read” the image, do the “BandMath” creating a new band from "scl_cloud_high_proba"and then “Write” it. The script gives error “Could not parse expression: ‘scl_cloud_high_proba’. Undefined symbol ‘scl_cloud_high_proba’”.

Am I doing something wrong? If not, there is a way of extracting a scl mask saving it a separate file/product?

PS
Indeed the scl masks are read from a .jp2 file, but it has no geo-referencing information so I cannot use it alone.

Kind regards,
Giulio

An update, if I save the original L2A product as BEAM-DIMAP format, then the masks are all kept and GPT sees them correctly.

Giulio