Xcode 14b2 + SPM: Previews not working. XCPreviewAgent.app not code signed properly

I'm trying to use Previews in Xcode 14 for Views in a Swift Package but I get the following error and I don't know how to solve it (Previews worked using Xcode 13). Any help would be appreciated! Thanks.

AppHostMustHaveGetTaskAllowError: XCPreviewAgent.app not code signed properly

"XCPreviewAgent.app" must be code signed in order to use on-device previews. Check your code signing settings for the target.

com.apple.dt.UVPreviewAgent-watchOS.watchkitapp {
    url: file:///Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/Library/Xcode/Agents/XCPreviewAgent.app
    attributes: [
        ObjectIdentifier(0x000000015338fd18): ["OS_ACTIVITY_DT_MODE": "YES", "SQLITE_ENABLE_THREAD_ASSERTIONS": "1"],