Hello @jakebeamish,
I have come across such issues in the past…
I generally put all code including attributes as as stroke() and fill() inside the beginning and end of any renderer.
References:
https://processing.org/tutorials/rendering
https://processing.org/reference/libraries/pdf/index.html
:)