Here's an updated script to try, just set the item on the start beat, run the script and set the items original tempo in the popup.
Let me know if it works for you.
right click Save Link/Target As
ReaTrak set item bpm and fit to project tempo map.lua
Watch Video