Check if your pyproject.toml contains something like:
[tool.poetry]
packages = [{include = "a_project"}]
Removing the line with packages = [{include = "a_project"}] helped in my case and should avoid including the root project. See documentation here.