$$A' = PAP^{-1}$$ $$\det(A')=\det(P)\det(A)\det(P^{-1})=\det(A)$$
Now, that makes sense algebraically, but consider the below diagram:
This a geometric representation of the two 'normal' basis vectors $\bf i$ and $\bf j$ (I will denote this set by $B$) in $\Bbb R^2$, and my choice of two new basis vectors $\bf i'$ and $\bf j'$ (I will denote this set by $B'$ ). The determinant preserves the area of of the unit square, which is determined by our choice of basis vectors. The unit square area in the basis $B$ is different to the unit square area in basis $B'$.
The determinant gives the area of the image of the unit square. The image of the black B unit square will likely be different to the image of the red $B'$ unit square, so why is $\det(A)=\det(A')$?

When people say that the determinant is the area of the image of the unit square, the unit square it taken to mean the square given by sides $e_1$ and $e_2$, the standard basis vectors. Another way of thinking about this is to note more generally that the determinant is the scaling factor of the image of a square so that $\det A$ is the volume of $\text{Vol}(A(\text{square}))/\text{Vol(square)}$. For instance, if $A$ is the identity, then the square given by $i'$ and $j'$ still satisfies $\text{Vol}(A(\text{square}))/\text{Vol(square)}$ since the identity doesn't do anything to the square. From this perspective, it should be clear the the determinant doesn't depend on basis, because the area of a square doesn't depend on how you choose to write its sides. If this is confusing, think about the fact that if you write the cube given by $i,j$ in the basis $i'=2i,j'=2j$ then its sides are given by $\frac{1}{2}i',\frac{1}{2}j'$ so that it's area is $\frac{\text{area}(i',j')}{4}=1$. Essentially, the coordinates for the sides scaled in the opposite direction that the basis vectors did.