for example the cutoff assignment works fine, then I close Logic, open it again and it's still assigned but it's not tracking anymore
That sounds like you quit both Logic and
Max. Max uses virtual MIDI ports. Every time you quit Max and then open your patch again, these virtual ports will get a entirely new CoreMIDI ID, even if their name never changes ("from Max 1", etc). This won't happen if Max is left open and you just quit Logic.
Here's what the port assignment looks like here after quitting Max and the reopening the patch:
It should look like this to work:
I have to do the assignment again and then it starts working again.
You don't need to redo the assignments, you simply choose the correct port from the drop-down menu. That's done in Expert View in the Controller Assignments window.
I should also mention I'm not having this problem with Logic Pro X. I can quit any of them and the assignment doesn't break.
Anyway, to work around this issue, use OSX's IAC driver instead of Max's virtual ports. The IAC driver's ports always have the same ID so the assignment won't break if you use that.