The correct term is sycophancy, not flattery. The problem is:
> "the AI tends to align with user opinions, sometimes even supporting incorrect statements to maintain agreement".
This is termed as sycophantic behaviour. Flattery is not the correct synonym.