Delay issue in time series prediction
The error may be in calling the actual time series "expected data" (unless you expect an unpredictable random walk).

If each sample is random and uncorrelated with all previous time series measurements, except for having a distribution mean near that of the immediately preceding sample (such as in a random walk), than any predictor (NN or other) of the next sample might lag (guess near the mean of the distribution, e.g. just the previous sample).

In the cases where the mechanics of some hidden state (planetary rotational or orbital momentum, etc.) is producing the measured data, a NN might be able to be trained to deduce certain hidden oscillators (low order diffEQ solutions involving that state) or some trend line, and thus not lag.

So, the lag you find may be a measurement of how well your NN is differentiating between the two cases above.

If you don't want to see a lag, then try increasing the training error function for producing a lagged output until the NN is trained to produce a different (more random?) output than a mere input follower, given a random walk input.