Why are position and momentum independent with respect to the Hamiltonian Action $S_H$ given by $$ S_H = \int_{t_1}^{t_2} (p \dot q - H) dt \ \ \ ? \tag{1} $$
While deriving Hamilton's equations from this action by varying the path, we assume that the variation in positions $\delta q$ is independent of the variation in momentum $\delta p$ and hence, we get 2$n$ equations. However, in the Lagrangian Action $$ S_L = \int_{t1}^{t_2} L dt \tag{2} $$ we show that the variations in position and velocity are related by $$ \delta \dot q = \frac{d}{dt} \delta q \tag{3} $$ How can position and momentum be independent but not position and velocity in the same set-up? Aren't velocity and momentum intrinsically the same thing?
(The Hamiltonian action was referred to in Qmechanics' answer to a similar question, but I couldn't show that the position and momentum are independent for the Hamiltonian action. Any help proving this would be much appreciated.)