Pretty url in frontend messes up with backend

I’m using advanced template with symlink in frontend/web to ../../backend/web like described here.

And I access to backend via

All is fine, except when I turn on pretty url in frontend config, somehow it affects backend also. For example, I have a rule in urlManager

‘<lang>/<category>/<id:\d+>/<slug>’ => ‘article/view’, which is working fine in frontend but when I go to url somehow this happens - $_GET[‘lang’] = backend

If I add lang=en in the url like this

everything is fine.

Pretty urls are disabled in backend config.

found a solution for this?