This is a common question. Technically, the engine (155cc VVA) is identical. However, the chassis, wiring harness (headlight wiring differs due to the round XSR light), and seat height specs differ.
If you download the official PDF (typically running 300–400 pages), here is the goldmine you are unlocking: Yamaha Xsr 155 Service Manual Pdf
Buy a physical Haynes or Clymer manual (if available for the XSR155/Traitor 150 platform) – they usually come with a free digital code. This is a common question