Timestamps fetched during a named query run during an SFC are of a different format than the exact same query run from the Script Console

No. Encoding to and from JSON is easy. The section of what you're doing that is liable to cause issues is the 'sending over TCP' part. The "official" way to send socket data in Ignition would be the TCP driver, but it's a very leaky abstraction. If you've already got Python socket code, it really isn't a significant uplift to rewrite it to Java's idioms:

The key insight is to use Java libraries - you can still write things in Python, so it's not false to say that the scripting you write in Ignition is Python. It is also true that it's a thin veneer, because it's a scripting language - we're not writing Ignition itself in Python, we're writing it in Java.

That's not remotely what I told you. Nothing in Ignition is non-deterministic. I am trying to make sure you understand that calling a script from the script console is not the same as calling a script in an SFC. Those two things are different from one another - but they are not going to be different between themself. If you want to test a script you are executing in an SFC, you absolutely can test isolated pieces of it via the script console provided you understand the differences implied by the different execution scope. The point I was trying to make is that you cannot say "oh, it worked in the script console, therefore it will work in an SFC" in all scenarios - they are different execution scopes, fundamentally.

Can you export a simple, self contained example SFC that is demonstrating this problem?