This older post involves some of the details of using neodymium-iron-boron magnets (NIB) in the DC-71 Bowser motors. Note the precise dimension quoted in one post.
https://model-railroad-hobbyist.com/node/17774
Be aware that the plating on these magnets is important. You should not cut or file them ‘to fit’ or they will corrode (and any crumbs or dust will pose a variety of hazards). Note the recent tip that flat metal cutting blades can be used as magnetic shims here…