TIER 4 visa students can travel outside the UK and come back during their studies. However, once the course has ended and especially after graduation, there is a risk of being rejected at the border; because the reason to come back to the UK on a TIER 4 student visa, which is study, has ended.
After researching, I found that there are 2 ways to travel in and out of the UK near the expiration of a TIER 4 visa and reduce the risk of being rejected at the border.
1) Sponsorship visa: If you are being Sponsored, one option is to ask your employer to give you a copy of the certificate of sponsorship, the offer letter, and, if possible, a letter saying that they are helping you with the TIER 2 visa process.
2) Packing and organizing personal things to leave: If you actually only need to pack and leave, the second option is to get a ticket outside the United Kingdom and have a clear speech about what you need to cancel or pack. This is, for example, canceling your back accounts, picking up your luggage, etc.
Please bear in mind that this post does not constitute legal advice.