Boolean modifier issue

Hello. Can somebody explain me boolean modifier issue. If I bevel edges on an object boolean modifier doesn’t work at all. See example below. Both object are the same only one with beveled edges.

Sometimes, duplicate vertices in the cutter cause such issues. Are you using a bevel modifier? You may want to drop a weld modifier on top.