I posted an issue and thought maybe someone could find any kind of problem with how I came to the issue.
https://github.com/elastic/elasticsearch/issues/27199
I'm having problems with long datatypes acting like integer datatypes during a painless script execution when trying to index using scripted_upsert.