If the event is catched by TForm1 and fired while the sender is MyCustomControl then the explanation is simple.
In Lazarus, the event is raised correctly... the code with the "with" expects the event to actually be matched to the custom control (even though it shouldn't be), and the event is matched to the custom control.
In Delphi, however, it's worse: the event isn't matched to the custom control (because, rightly, the with doesn't see it) and is matched to a "random" control (the compiler's rule for choosing the assignment chain is unknown) in the Form1 example.
So, even though Lazarus exposes itself to a missing visibility limit, the behavior is what the programmer would expect.
In Delphi, however, the event is matched to a "random" control, and this is probably worse (although, as @Remy explained, it might be the logically most correct behavior).
I agree with @Thaddy, modifying FPC's behavior could make the situation worse.