what the agent captures there in this case are the database statements. You say you use Npgsql.EntityFrameworkCore.PostgreSQL - which means the application does not create the SQL statements directly, instead it relies on Entity Framework Core, which generates the database statements. It's an Object relational mapping framework which takes care of translating tables and rows from your database into .NET objects.
I think it's normal and expected that Entity Framework Core creates different database statements based on the current state of the database, your app, and things that EF already fetched.
So to me this looks like an expected behaviour - this is how an ORM works. If you'd have hard coded database calls with hard coded SQL statements, then you'd have the same spans, but that's not the case here from what I see.