You need to multiply your DPI by 24/27. That will fix the sensitivity for both 2D and 3D.
800 * 24/27 = 711.111111
If you set the DPI to 700, it will pretty much make it the same as before. You won't need to change the ingame sensitivity.
24 inch screen is 20.918 inches wide. 27 inch screen is 23.533 inches wide.
Before: Moving the mouse 1.35 inches moves the cursor 20.918 inches.
After: Moving the mouse 1.35 inches moves the cursor 23.533 inches.
If you multiply the DPI by 24/27, moving the mouse 1.35 inches will move the cursor 20.918 inches again, returning the cursor speed to normal.
Displaying the same FOV on the 27 inch monitor is the same as zooming in 1.125X (27/24) on the 24 inch monitor. So cm/360 also needs to increase by 1.125x. Multiplying the DPI by 24/27 will do exactly that.