I have seen on various constructions where there is a notch at the ends of the rafters, but they might be a bit over-dimensioned to handle it.
No one else who knows or has any smart solution...
It is entirely possible that I am wrong. The beam is supposed to withstand two forces. Firstly deflection, where your solution works. Secondly shear, and there it is probably as I say.