Disable PatternMatchingInstanceof error prone check

Change-Id: Icfb1643b60ef324d9ea8672d9d3120544923427b
Test: TH
Bug: 342332820
Bug: 377918299
diff --git a/soong/error_prone.go b/soong/error_prone.go
index ab38e6a..20e74e7 100644
--- a/soong/error_prone.go
+++ b/soong/error_prone.go
@@ -154,6 +154,9 @@
 		// requirement. The warning is overtriggered when source depends on the API stubs, which
 		// may not include the toString() method.
 		"-Xep:ObjectToString:OFF",
+		// Disable the check which is introduced by the Java target 21 until modules 
+		// can be fixed individually (b/377918299).
+		"-Xep:PatternMatchingInstanceof:OFF",
 	}
 
 	config.ErrorProneFlags = []string{