Prevent the user profile from being displayed in backend theme using RouteSubscriber
Issue:
Authenticated users should never see the admin/backend theme in your websystem
Prerequisites:
You need to have the profile module installed in your project.
Solution:
Paste the provided code snippet into your RouteSubscriber.php file.