I am in a similar situation, but have only been here 2 years. I have a high salary and another 5 years on my visa, no debt, never paid anything late in my life, but my credit score in the UK is ‘fair’ and therefore too high-risk for a mortgage.
Good luck. Please keep us updated with your progess.