For the third or fourth time I answer your question.... Middlesborough falls within the ceremonial county of yorkshire, but is not part of the county of yorkshire as it is located beyond the boundary of yorkshire.
Middlesborough is part of
North Yorkshire. There isn't a "county of Yorkshire".
You started off being wrong, you then tried to google to back up your wrong claim, you've then had to ignore evidence to the contrary and rely on some maps from google image search. Then you attempted some backtracking etc.. and a partial acknowledgement that it is in Yorkshire. We're nearly there... but you're apparently confused by local government, namely whether or not some area was governed by a county council.
To clear up some confusion... Middlesborough, as it is a large town, is a "unitary authority", this essentially means it handles everything local government related.
North Yorkshire county council covers the "non-metropolitan county" of North Yorkshire, i.e. the mostly rural bits. Essentially in these areas the county council is responsible for Education, transport, strategic planning etc.. and the local districts for local planning, housing etc..
Perhaps to try and illustrate this further can you try to answer these questions regarding some other urban areas that you might well be aware of?
Which county is York in?
(fun fact - much like Middlesborough, York, as it is a city, is a "unitary authority" so not governed by North Yorkshire county council)
Which county is Blackpool in?
(fun fact - Blackpool is a unitary authority, it functions independently of the Lancashire county council)
Have you thought about your answer... has it become apparent that
if you're going to maintain this rather silly position then you'll also need to contend with the fact that by your logic "York" is in fact not in North Yorkshire simply because it is big enough to manage its own local government as a unitary authority instead of having the county council manage things for it in conjunction with a smaller district council.
In fact I could go down a whole list of UK towns and according to your argument they're apparently not in the county they're actually in, simply because their council is able to handle all local government for them.