I want to change the form action on form build. I tried with
'/page', but it doesn't work.
There are several triggers that can prevent $form['#action'] from working in an alter hook. See:
For example, there is a no_redirect property:
"If set to TRUE the form will NOT perform a redirect, even if self::$redirect is set."
You can test this with