Your Tier 4 clearance will still be valid until the last date shown on your visa (most likely your Biometric Residence Permit).
However, the immigration officer (IO) conducting your landing interview might further question your intent to enter UK with a short leave remaining. They are trained to do so - this (slightly out-of-date) document details the thought process behind the decision making of an immigration officer. In this document, they mentioned one of the most common reasons to refuse your entry is that in their opinion you are seeking entry for work (which is restricted for Tier 4 visas), or of high risk to overstay:
The reasons for refusing a passenger are recorded by IOs on IS125 forms. [...] The results of this exercise showed the most frequently noted
reasons for refusal were ‘unclear intentions’, ‘economic circumstances of passenger’ and ‘evidence
of intentions to work or stay’, which corroborate the findings of the qualitative study. (Page viii)
If they are satisfied by your intention (to defend your thesis), and you will leave when your visa expires, they will let you in. Your case will be much stronger if you can produce evidence that you obtained further leave, but nothing is guaranteed (and I am not a lawyer).
My anecdotal experience (a few years back, when I am in a similar situation as yours) is that you will be fine telling the IO you have a Tier 5 visa coming up and show them your visa vignette - they will just stamp your passport and wave you through.
N.B.: The links are obtained from this question, which asks what questions an IO ask when they conduct a landing interview.