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 domain.com/backend

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 domain.com/backend/index.php?r=article/index somehow this happens - $_GET[‘lang’] = backend

If I add lang=en in the url like this

domain.com/backend/index.php?r=article/index&lang=en

everything is fine.

Pretty urls are disabled in backend config.

found a solution for this?