Quoted from Videogod:A lot of of us have had this problem, and this is the best fix (in my opinion). Glue a very small piece of foam as shown. The ball will rest on the foam instead of the post. Then when the trunk rotates, the ball will just glide off of the foam to freedom!
As this method maybe an easy fix; a cleaner version would be the leon board fix. I have it in my game and whenever a ball gets stuck up there (or any stucky) and the game goes into ball search the board tells the motor control board to spin the trunk the opposite direction thus effortlessly and seamlessly putting the ball back into play.
Link to the board: https://pinside.com/pinball/forum/topic/tom-trunk-error-leons-fix-anyone-done-this/page/13#post-3626374