Bai Matan didn't appear in the play at all. Bai Matan was playing dumb. KID accidentally contacted those bad guys when he sent a notice letter before. Those people thought he knew their plan and wanted to kill him (Conan and Kogoro speculated in a conversation with a tramp when they went to an abandoned house to investigate), so KID wanted to investigate. He stole the ID of the garden to make it look like Bai Matan was close to Conan and Pingji. Later, when he fled with Conan, his ID card was stained with paint. Bai Matan's so-called lover in the amusement park is also fake, the kid casually said.
Later, the boy disguised as Bai Matan broke up with Conan, saying that there was something else, that is, to expose Reiko Kobayakawa (or Reiko Kobayakawa? I don't remember) a conspiracy with her senior.
KID returned the ID to the garden, so the garden found the ID in the bag and found that it was stained with paint. The police accidentally recycled the ID of the garden into an explosion ID, but missed the original one, so there was a final thrilling scene, and it was precisely because KID had been with Conan and them that he helped them at the last minute.
Finally, Pingzhi asked Conan why he was here, and Conan replied that he had been following us.