You need a bidirectional LSTM. The temporal direction on the original LSTM and on GRU type cell connectivity is forward in time. Fortunately, the bidirectional class is available in Keras.
from keras.models import Sequential
from keras.layers import LSTM
from keras.layers import TimeDistributed
from keras.layers import Bidirectional
model = Sequential()
model.add(Embedding(max_features, 128, input_length=maxlen))
Now the network has causality from both history and forecast. This is only useful if the forecasts reduce entropy, which means they have to be known effective forecasts that when fed to earlier cells (in the time domain) will enhance accuracy and confidence metrics.
When the loss function (for its derivative) is provided, it must return the error at $t = t(i)$, where $i$ is the index of the last sample in the sequence before the values become forecasts. This is the main distinction when the sequence includes both history and forecast.