Well, I think that the first thing to do is to book an "appointment" with him to discuss the coming academic year. Set a day and time with him. Say that you realise he is an adult now but you are still supporting him/ giving him a roof over his head and you need to discuss with him his aims and targets for the year ahead. By booking in advance it gives him time to reflect without the immediate teen defensiveness etc.
Then before the meeting, think about your "hard boundaries". So those might be a fair share of household chores, a financial contribution to the household, a minimum of 30 hours constructive work a week ( this could include a mix of repeat A level classes, his job, any volunteer work, driving lessons - whatever seems appropriate). Explain this is for his benefit to get him back on track.
Ask him what he thinks about his A level. Does he think he worked to his best advantage.
Askim to show a plan for how he is going to get better success in the A level ( did he actually fail it, or get a U grade in which case he was either spectacularly messing about or the subject isn't for him - or did he get a pass grade but not high enough for university). He will probably complain and say he isn't a child etc etc and why does he need to tell you his plan. Your answer, the plan he followed last year didn't work, if he was in a job he would have to show relevant work plans to his boss , you can't allow another year to go by where you are funding him and he messes up by not applying himself. Emphasise that if you do what you've always done, you get what you've always got and that you don't want that for him and you don't think he wants that either.
Ultimately, you can only hold boundaries that you are in control of so think about what that would be. (Withdraw WiFi, only offer basic food, start charging more in rent, stop funding hobby etc).
Hopefully he will respond to the positive encouragement but you have to decide for yourself what line you will take if he doesn't, then hold to it.