I'm using the ADC in the SAMR21, specifically the AIN[5] (alternate function B in PA05) but it seems it works no matter if I enable the PMUXEN for that pin or not, and even if I enable the multiplexing function but I use any other function than B... So, as long as I initialize the ADC module and trigger a conversion via software, it works even when the pad is selected as GPIO (as a digital port).

This is kind of weird to me as I would expect the pad not be connected to the AIN input, unless it's appropriately configured. My main concern is it's not fully working as it should or there is something else not completely correct.

GPIO pins in the M0+ series are very versatile. As blue_z points out, the multiplexing is rich, to the point that you can configure things to *always* allow a read. Initialising the analog read will enable that function. Just be careful that you don't disable it mid-read by re-configuring and setting a digital output value.