How to fix «Your current session has been expired» backend error in Magento 2.3 ≥ 2.3.7 and Magento 2.4 ≥ 2.4.3?

bin/magento config:set system/security/max_session_size_admin 9999999
bin/magento cache:clean

I also recommend to fix it for the frontend too.