I’m not very handy, so grain of salt here:
I’m thinking that the gasket you have isn’t the correct part (even if the third party says it is). I would double check the dishwasher model number, ensure you have the right gasket for that, and then order OEM if you were previously correct.
I think if you glue in the gasket, even if it holds, it would likely leak somewhere from not properly fitting.















https://newsroom.ap.org/editorial-photos-videos/detail?itemid=b325ab10ef4945758dc179c6632a89a0&mediatype=video
Not sure if this is the original source, but it has some more details