Take a look at this schematic of a mature mRNA.
!enter image description here [[source]](
The coding region (ie the part that is translated) is between the start and stop codons, but the 5' and 3' untranslated regions (UTRs) are also transcribed by RNA polymerase; these are part of the first and last exons, respectively. The transcription start site is labelled right in front of the 5' UTR. For the purpose of this answer, transcription termination can be said to occur at the poly(A) signal (the poly(A) tail is added post-transcriptionally, as is the 5' cap).
To be clear, the point I'm hopefully making is that transcription does not involve codons. RNA polymerase does not stop at the stop codon nor does it start at the start codon. In fact, it doesn't even "know" what codons are.