This is a MDL-61621 followup: https://github.com/moodle/moodle/compare/master...dmonllao:MDL-61899_master#diff-fdac20da71fba5816c09a56bd865fbbbR324
I am delaying this change until next week as we are quite busy at the moment and this requires us to bump the required version in moodlehq/moodle-tool_dataprivacy as we need to point to moodle core versions including MDL-61621.