This function extends a matrix V (assumed to have fewer than p columns)
to full rank by iteratively appending standard basis vectors from the identity matrix,
ensuring that each added column increases the rank.
get_extended_matrix(V)A numeric matrix of dimension p x p with full column rank.
A numeric matrix with p rows and fewer than p columns.
The function assumes that nrow(V) equals the intended dimension p of the parameter space.
It adds columns from the identity matrix (i.e., standard basis vectors) only when they increase the rank,
and stops when full rank is achieved.