When you see an error, such as in the following screenshot, you may consider why your database is trying to access a hidden system database.
The reason for this error is that all privileges are granted when authorizing the login on the database as you see below.
As a solution;
Just remove the privileges in the db_denydatareader and db_denydatawriter roles.