You can cut it but probably shouldn't pass the post on in the future. Whatever the distance from end to the "Max" line offers a conservative guide for the minimum insertion depth. But the principle of the max line is based on a very rough calculation of possible rider weight, saddle position, terrain, and other considerations. It is very conservative.
I'm all for making parts your own and personally would have no issue with cutting the post. A 400mm post can be safely shortened to 300mm if the minimum insertion depth is followed. The post becomes less likely to bend when shortened so, theoretically, you could even raise it up a bit. Haha