You shouldn't put the test project inside the main project, you should create a solution then link the main project "webapi" and the test project.
on your new folder create the test project using the commands it's more stable I'd say:
# dotnet new xunit -n "Webapi.Tests"
your main project should be in the same folder
WebapiProject
|__ Webapi
|__ Webapi.Tests
Note that you should create a solution and add them together into a single solution, also don't forget to add the main project reference inside the test project.