First, the circle in blue is the essence of LSTM and it will never be disabled or you will not have a rnn/lstm at all. That arrow means that whatever the value you get from the last rnn/lstm cell, you will pass it to the next rnn/lstm cell and it will be processed together with the next input. The only difference between rnn and lstm is just that a simple rnn does not have that blue-circled arrow, only the black arrow below while lstm has that arrow as a gate for short/long term memory.
Second, for return_sequences, it is typically used for stacked rnn/lstm, meaning that you stack one layer of rnn/lstm on top of another layer VERTICALLY, not horizontally. Horizontal rnn/lstm cells represent processing across time, while vertical rnn/lsm cells means stacking one layer across another layer.
When you set it to false, it means that only the last cell (horizontally) will have that red_circled arrow while all other cells (in the same layer) will have that red_circled arrow disabled so you will only pass one piece of information from all that horizontal layer (that is the information passed by the last cell in that layer).
Conversely, when you set it to true, all cells from that horizontal layer will have that red-circled arrow abled, and will pass information to the layer stacked top of it. It means that if you want to stack one rnn/lstm layers on top of another, you need to set it to true.
Lastly, for more information you can refer to this book. It has great explanation for this return_sequences option: https://www.oreilly.com/library/view/hands-on-machine-learning/9781492032632/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…