It ended up being something very obscure. I had the lookup fields in a collection. I also had javascript configured to delete all rows of the collection be clicking on the X button when the form is loaded.
The button to remove collection rows looks like this
Manually clicking the X button for a collection's rows doesn't explicitly disable lookup rules but the javascript was written like this:
// Get all X buttons from my collection
var cusid_ele = document.getElementsByClassName('cf-collection-delete');
// Click them all
for (var i = 0; i < cusid_ele.length; ++i) {
cusid_ele[i].click();
}
Seems really straight forward and I expected this would be the same as the user manually clicking them.
However as soon as you add a second row to a collection, two of these X buttons appear where there was none to begin with. The first is a hidden one that is always there.
If you try to click both, one will disappear before you have a chance, preventing deletion of the first row.
Javascript does not have this limitation though, it successfully clicks both too fast for the system to remove the other. Somehow, if you click both X buttons in the collection at the same time, it disables ALL lookups across the entire form, replacing the return values with whatever the last lookup values were in cache before clicking both buttons. Even lookup rules outside of the collection were effected in this way.
In preview, javascript was even finding a way to click the hidden X button for the first row, but the lookup problem does not happen unless you click both the first X button and the second X button at the same exact time, which requires 2 rows of data, which was only present in the task. This is why it never broke in preview.
The workaround is to never click the hidden X button in the collection, which is always the first one. And simply clear the values of the first row instead.
$('.clear select').each(function() {
$(this).val('').change();
});
$('.clear textarea').val('');
var cusid_ele = document.getElementsByClassName('cf-collection-delete');
for (var i = 0; i < cusid_ele.length; ++i) {
if(i>0) // Never click the first row's X button
cusid_ele[i].click();
}