This line constructs the object for tagAttributeValues improperly which causes this feature of Ammonia to not work with whitelisting specific values for attributes. All it needs is for this line to be encapsulated by the Object.fromEntries
function and it should work.