join on project id, then delete missing.
delete
from final_table f
join #temp_table t on f.project_id = t.project_id
where not exits (select *
from #temp_table t2
where t2.project_id = f.project_id
and t2.pipeline_id = f.pipline_id)
or just a where clause:
delete
from final_table f
where exits (select *
from #temp_table t
where t.project_id = f.project_id)
and not exits (select *
from #temp_table t
where t.project_id = f.project_id
and t.pipeline_id = f.pipline_id)