Had this problem for months now. Just revoke storage permissions from the gallery app and use a different app as gallery. Xiaomi apps that always use the gallery (ex. clicking last picture in the camera) will suck to use with this but oh well.
Xiaomi needs to fix this.