Messy keyboard reaction times with waitRelease=True

[I am encountering this problem with version 2024.2.1 whereas I did not have this issue with 2022.2.1]

In my experiment subjects are asked to press certain keys during one trial, hold them down, and release them in one of the following trials. I need to store their reaction times and the duration of every key press.
If the key is pressed and released within trial n, all good.
When the key is released during trial n+1 , the key event is logged in the row corresponding to trial n+1 but the reaction time refers to trial n

If somebody can assist, I have opened a github issue with more details and code https://github.com/psychopy/psychopy/issues/6853

I believe PsychoPy is behaving correctly in this case though, since reaction time is counting time elapsed since key press, while key release is a different event that can be separately used to control experiment flow and get logged.

In your case, shouldn’t the reaction time refer to trial n when participants pressed the key during trial n? You can post-sort when the trial was released by looking at the key release event, which sounds like is getting attributed to trial n+1.

What’s your preferred behavior in this case?