Had a similar boot up problem where a Ubuntu Raspberry Pi failed to start the python application from a systemctl script because the X display had not yet started.
Consider starting a script which loops on testing if the X display has started and only starts the actual python application after detecting an active X display.
For example, a BASH script testing if openbox has started may look like this:
#!/bin/bash
# Check if openbox has started.
while [[ ! `pgrep -x openbox` ]];
do
sleep 1
done
...append code to this script to start your application. If necessary, change the name of the desktop from openbox to the desktop used.