I see no real principle underlying this pattern of choice except that of the necessity to adapt as best as possible to the various contingencies brought about by nessarily eclectic practices of word formation and evolution; still, what I can gather of facts might contribute to a basis for a more precise set of justifications.
As pertains to the adjective the agreement is consistently effected. As pertains to nouns it depends on whether the noun comes in
two forms, each particularised to a gender (passager/passagère, animateur/animatrice, secrétaire/secrétaire…) and then the agreement is compulsory, or
one form only (agent, maire,…) and in this case there can be no agreement, or
a marked form and there is no agreement (“Cet animal est une oie.”, “Cette femme est un fauteur de trouble.” (“fautrice” is rare),…).
Nowadays, however, the words traditionally belonging to case “2.” are being transmuted; “maire” is not feminine in the TLFi but “la maire” can be found in writing; “professeure” (necessarily a feminine word) does not exist in the TLFi but is found in print.
It seems that for “liche” as for countless other such nouns the initial coining of the term, that has been made in conjunction with the attribution of a gender as is most often the case, is sole decider; that’s what’s making one say such things as “Cette personne est un homme.”.
The existence of non decided cases is a remarkable enough phenomenon; for example in zoology one finds “l’ordre des gallinacés/gallinacées”; either one of the two following sentences can be used to say exactly the same thing;
- “Un poulet est une gallinacée.” or “Un poulet est un gallinacé.” (That is possibly the reason why nowadays the two words are on the brink of being replaced by the word “galliforme”.)
Note Oxford dictionary, marked: Ling. Of a form, entity, etc., in a binary pair: carrying or distinguished by (a specified) distinctive feature; less frequent or usual of the two. mid 20th century.
My understanding is that unlike with predicate adjectives, the gender of predicate nouns never depends on the grammatical gender of the subject: it would just depend on the type of the predicate noun, and possibly the natural gender of the referent.
What I meant by “the type of the predicate noun” is this. Some French nouns are “epicene” and have a single grammatical gender regardless of the natural gender of the referent. A common example of a nouns like this is victime, which is always grammatically feminine. Other nouns come in pairs with a masculine and feminine form that generally have to match the natural gender of the referent (although in certain contexts masculine forms may be used as a kind of “default”).
Since an epicene noun only has one gender, it obviously cannot agree in gender with any other nouns. Adjectives do show agreement with the grammatical gender of the epicene noun, and pronouns (usually) do (I think the situation with pronouns is more complicated, so I won’t try to explain it here), but other nouns would not.