A lot of slur design and positioning happens automatically in todays notation software but there are some choices that are left to the user in some software that is best to be aware of. Namely the length of a slur.
Regardless of whether the slur is a phrase slur, breath slur or bow slur, the slur includes the first and last of the included noteheads and tied notes in either ends of the phrase.
This means that the two first notes are in the same slur, then the next three and the last two:
The first staff is incorrect since it doesn’t include the last notehead that is within the slur.
The second staff is correct since the last slur extends to include both B’s since they are tied and conceptually they are one note.
Sometimes you write a note under a slur and later change the length so you end up with the top staff below, but it’s simply a matter of changing the slur length to include all of the affected noteheads:
But if there are multiple tied notes included in the slur it is okay to stop at the first whole bar note. Compare the first staff to the second in the example below: