Had this similar issue and 1st time Tcm was replaced by dealer, 2nd time torque converter was replaced along with new fluid. Having the codes pulled made the difference and pointed at tcm vs no codes on torque converter and an engine stall test would help to confirm torque converter issues.
1 check codes, if no codes then stall test to perform to see if u confirm torque converter has fault, if nothing then change fluid as 1st step, change torque converter might be 2nd step that cost more money for parts and time as you have to pull transmission and change like changing a dry clutch etc.
you might also check your engine mounts first as if they are eroded/disintegrated that can cause the rev/rpm change also.
all from experience....
others have mentioned sensors which is true but you check those w codes or via scan tool making sure readings are accurate in input and output shaft readings etc. and may show faults when looking at live data vs fault codes as has to reach certain numbers of faults to throw codes....
tcm failure 40k miles,
torque converter about 80k and no towing
TCI builds quality aftermarket torque converters