I have tested the TF40 305 18x20 (2020 and 2022 version) extensively and use the 97p as my main racquet. I would claim that the 97p feels a lot more comfortable than the TF40 frames - although I have not tested the 16x19 version of the TF40, I assume the general feel of the TF40 frame is very similar. The TF40 frame feels noticeably stiffer than the 97p, but then the 97p is among the most comfortable and soft feeling frames ever. Apart from the feel the TF40 frame is also thicker and being an ultra-sensitive racquet-nerd I can 100% feel a difference between 20 and 22mm frames, meaning the TF40 definitely doesn't swing as easy (on OHBH for example) as the 97p, there's more "air resistance" when swinging the frame and also when hitting volleys. The 97p is an exceptionally soft and thin frame, you feel as if you swing a scalpel. The TF40 is thicker, "meatier", has more "oomph" and although the specs read comparably similar, it also didn't feel as headlight as the 97p to me. Frame width does make a difference in my opinion, even if all the other specs read quite similar.
So my personal advise would be: choose the 97p if you value comfort and control above everything else and have a tendency to move forward and like finishing points at the net. Turn to the TF40 if you don't care sacrificing a bit of control and some comfort for more "oomph"/ punch and a solid baseline-game. The 97p isn't the best choice for longer baseline-rallies, the TF40 can hold its ground at the baseline and the net, but it is also a compromise regarding comfort and control - compared to the 97p which is clearly focused on attack, control and finishing points early.