that's just how AE works. It can't read from cache at full speed, so loads as much of the cache it can in RAM memory, because it's not fast enough to apply effects, masks, and so on on the fly. it can take several seconds just for single frames, so when it does any work, it loads the uncompressed frames into RAM, for fast playback. if you select 25%, then 50% and play it both times, then both will be totally stored in RAM.
32 gigs is simply not enough for something that uses memory in such a fashion. 128 gigs is the suggested amount, and for anything above a few seconds of 1080p, 64gigs is considered the minimum. After Effects' "effective uninterrupted frame count" is limited by RAM, and almost scales linearly. almost.