Different Results From sys.databases As Different Users
This appears to be a matter of access rights and the specific user in the database.  The first thing to understand is that sys.databases in any database is simply a view that exposes parts of the system table that lives in resourcedb.  Anytime you are querying that in any database, you're hitting the same table but through a different view.

The second thing to understand is each database has a dbo user.  When you use the execute as user = N'dbo', that means you're dbo in the context of that specific database.  In your specific example, the dbo user in master and the dbo user in tempdb are two different security principals.

What you're seeing is simply a matter of what each principal is allowed to see.  dbo users, being the owner login of each specific database, only have rights to see the following databases:


master (in order to look up control information)
tempdb (in order to create temporary objects when necessary)
The database they own


Note that the dbo user in master, since that database needs to see and supply control information for all databases, has rights to view all databases on the server.