Hello again!
Upon further investigation, it looks like you are running into this issue because of the added security measures you mentioned. sudo
now requires a tty to be able to run. maybe you can try changing the sudoers file with Defaults !requiretty
(source: https://apassionatechie.wordpress.com/2018/02/14/sudo-sorry-you-must-have-a-tty-to-run-sudo/)
Let us know if this works