I've got the same problem; trunk both fpc & Lazarus, cross-compiling from Windows.
The link by @skalogryz is not helpful here; the error appears in CocoaPrivate.pas, which is part of the LCL; but it refers to ancestors in NSControl -> NSView -> NSResponder, which are defined in FPC package cocoaint.
Digging further, the return type of these two functions is bad. In FPC, it's BOOL = boolean8; in LCL, it's Boolean.
So break is totally within the FPC/Lazarus world, not Dark Mode / Mojave related.