Dreaded lid leak on new master cylinder...ideas?

I went through that as well. I took mine off and used a belt sander on the top of the master cylinder to get a nice sealing surface. Cleaned, bled, put it back on and don't fill it to the top. That worked for me. Most are not flat on the sealing surface.