Raising a Custom NPC’s affection to max or near max will have them give you a house key once clicked, but will not trigger a dialogue event. Further attempts to interact with the NPC from that point will not trigger text, only more keys. They’ll then follow you and keep giving you more keys to nowhere.
Dropping the keys in front of the NPC ended the loop and allowed text to proceed as normal