It's a tricky one.
I worked as an ATPL theory instructor for 3 years, and regularly got requests from airlines asking for flight school reports and ground school averages (including no: of attempts). However, as the market has improved since about 2015/6 the number of sittings or retakes didn't seem as important.
I know of students with between 3-5 fails having used all six attempts getting interviews with airlines such as Flybe, and others with almost perfect records struggling to get any contact at all.
My personal stats were, 88% average with 1 fail. However, during my one and only interview, at no point were theory exams mentioned at all. They had clearly seen my CV and said "He'll do"
Interviews these days are overwhelmingly based on competency. They care about who you are, and what you're like as a person than how smart you are. You have, after all, already proven you can pass all the required training.