How to remove the GAP in line plot between two dates for actual and predicted values

I am creating a line plot for monthly forecast, with lines of actual and predicted values with different colors but line is not connected between the last point of actual and first point of predicted as the data is on monthly dates, is there a way to connect the points with a line?

Add the last actual data point to the predicted data set, assuming they are separate traces. Add the predicted trace after the actual (like it seems you are doing) and a green line will show from that last actual point.