A resposta curta é não, você não precisa passar pela imigração.
Considerando que você estará viajando em um ticket único e sua duração de trânsito for menos de 24 horas , o seguinte será aplicado
International transfer passengers flight routes issued on single ticket continuing to a foreign destination with Turkish Airlines*
- Passengers disembark with only their cabin baggage and proceed directly to the boarding gates without any flight or passport procedures.
- Passengers who have not obtained their boarding pass for the connecting flight at the initial point of departure must apply to the Turkish Airlines Transit Check-in desk.
*Including which flight routes issued on single ticket, Star Alliance members and airlines with a codeshare agreement with Turkish Airlines.
source: link