Despite removing and re-adding the package dependency, the issue persisted. However, restarting Xcode resolved the errors effectively.
XCode version 16.1