Tablet simulated right click doesn’t work except in the file browser

I have turned on the simulated right click in the system settings. When I use an external mouse, holding the left mouse button triggers a right click as expected. However, doing so with the finger on the touchscreen of the tablet doesn’t. Surprisingly though, it works in the file browser but nowhere else.