I used this line of code in PyQGIS to get to project's home path.
path=os.path.join(QgsProject.instance().homePath(), "tt.gpkg").replace("\\","/")
Now I thought this is the path to where the project lies. But it comes that this is the path to where first/original project was saved.
Is that so or I might be wrong here?