Strange behavior with Boolean Difference
How is your notch supposed to be? From what I experience:


You need to lower down your small cube a bit, otherwise its bottom face will overlap the U bottom face and it's a problem for the Boolean modifier. Now it works well.





For the second shape, it looks like it works correctly, what problem have you encountered?