Very Interesting! I have written code that had the exact same problem mentioned in this article. My solution was to use selenium and use the time.sleep function so it would wait for all the data to load in then I would use beautiful soup to scrape!
I also tried to make a similar code like yours except for the NBA, but unfortunately I couldn't find an Ultimate Basketball website. I still really love your code!