I think you're underestimating how massive the earth is and how much gold it still has. If anything, our technological capabilities mean our absolute rate of mining gold increased over time unlike bitcoin. And we are STILL mining after thousands of years. Bitcoin's existence also depends on miners mining so it is even more important. Gold can still exist without people mining it.
But even if I concede that point for the sake of argument, there is a 'virtually' limitless supply outside of earth that we will keep mining practically forever.