After entering the code, click the "Save" button at the top right of the screen (in green). If you don't, the changes won't be applied.
IMPORTANT: Once you activate this option and save the settings, SOGo will always require the verification code from your app to log in.
Make sure you have scanned the QR code correctly and that the app is generating codes before saving. If you save the settings without the app configured, you may lose direct access to that email account in SOGo.
This setting only affects access to SOGo (email, calendar, contacts), not other services.