stock price reflects the expected value of the company, not the actual current value.
the dividend is part baked into the expected value over time.
imagine META being fucked by EU regulation with lawsuits and over a period of time tried, then fined 5billion. META market share does not drop by 5B at the day when the fine is announced. The expectations builds into the price over a period of time.