Weird Overheating

Hi, my car does this weird thing where the temperature suddenly spikes all the way up when I’m driving, then within a matter of minutes or seconds it drops back down to normal (without stopping the engine). Coolant is full, fans working fine, and as far as I know the radiator has no leaks. Anybody know what’s going on? Doesn’t make sense the engine heats up so quickly and cools down so quickly. 1998 Subaru Impreza 2.2