The answer depends on the fact that the road runs out of town. There, a driver must stay as close as possible to the right edge of the roadway and may not use the left lane if the right lane is clear. You need the left lane while you are getting past the truck, which is driving in the right lane. As soon as the truck is behind you and the right lane ahead is clear, you must move back into it