For an sot-223, or other 3 pin + thermal tab transistors, no you don't have to connect both, as the middle pin and tab are connected in the leadframe. But verify that there isnt exposed metal between the center pin and thermal tab. SOT-89 can have this, so running a trace, there would only be soldermask providing insulation.