In this post mpiktas showed that the sample correlation measure for two random walks (possible correlated) is a random variable and does not estimate the theoretical correlation. When trying to find a cointegrating relationship between two non-stationary variables using Engle-Granger we estimate the cointegrating vector through OLS, which implicitly involves using the sample correlation.
Given that the sample correlation does not give a consistent estimate (at least for the random walk case) for correlation, should we really use OLS to carry out the estimation or is there some other technicality that validates the usage of OLS?