I ended up getting something to work by removing:
@Query var favorites: [FavoriteModel]
and adding a favorites relationship to my project model:
@Relationship(.cascade) var favorite: FavoriteModel? = nil
Just extra bookkeeping when I favorite a project, but it probably was the correct way to implement this.