Yep this is expected behavior. In order to issue a query against a Datomic database, you must retrieve the current database value. A database value is the state of the database at a given point in time. You can issue as many queries against that database value as you want, they will always return the same results. This is part of the value add of Datomic :).
You can always get the current DB in your query by doing the following:
In addition to what @jaret said, it’s often advantageous to use the :db-after provided by d/transact fn return map, when a flow of logic needs to transact data and run queries on the result of that data