How to time codes, frames, and physics steps per second relate to each other?

The simulation stepping (“Time steps per second”) should be independent here, thats strictly defining the substepping for physics simulation.
However to be confused even more there is a fifth parameter that you are missing. There is also Min Simulation Frame Rate (should be in physics settings window). Now this defines the lower bound how much physics should substep, otherwise the simulation would continuously slow down the whole application if the general frame rate is not high enough.
The default is 30, so if your FPS drops below 30fps, physics will start discarding steps to not slow down even more.
This is probably what is happening with the observation above, with FPS 60 all should be simulated as expected, with FPS 24 you are starting to drop simulation frames. Try to change the Min Simulation Frame Rate below 24 to see if it fixes the behaviour.
image