Correct APA 7th citation of R packages

Hello all,
I have a problem with the correct APA 7th citation of R packages.

Actually, it should look like this:

Pinheiro, J., Bates, D., & R Core Team. (2022). nlme: Linear and Nonlinear Mixed Effects Models. Version R package version 3.1-160. CRAN - Package nlme

It looks like this, though:

Pinheiro, J., Bates, D., & R Core Team. (2022). nlme: Linear and Nonlinear Mixed Effects Models. In (Version R package version 3.1-160) CRAN - Package nlme

Endnote seems to interpret the version as a book title and therefore uses the “In”.

In Endnote I have given the information as follows:

Maybe someone has an idea how Endnote outputs the correct citation.

Thanks!