You should have an L shaped retainer on the front that's the same height or taller than the block of wood on the back.
I don't know a good solution for the sides. On my own cab, I used sticky butyl rubber peeled off sound deadening panels.
Rolled it into a thin strip and worked it into the sides with the edge of a credit card.
Nobody notices it, but I've never been completely happy with it.