MetalMessiah78, thanks for your feedback!
Foobar2000 uses neroaacenc CLI for encoding. Thus, unfortunately, gaps still persists even with foobar encoding.
I wonder why they are added at the beginning of the file and not at the end? Maybe it's a trick to make it impossible to use oneroaacenc-encoded files in video and use Recode instead?

I tried MainConcept encoder at AAC MainProfile and AAC LC. Both work a way worst than NeroAAC, but they do not add gaps.