Can a Postgres LIKE statement return an exact match?
% will match any sequence of characters, including none. So this is a match:

SELECT 'match' WHERE 'username@domain.com' like '%.com%';
-- Result: match


If you have the exact username and the exact domain you can use the following filter:

SELECT * 
FROM users 
WHERE 
    local_username = 'username@domain' OR   -- Exact match
    local_username LIKE 'username@domain.%';    -- Exact match until dot


If you have partial filters, you will have to add a few more % (place depends your needs):

SELECT * 
FROM users 
WHERE 
    local_username LIKE 'username%@domain' OR   -- Exact domain ending
    local_username LIKE 'username%@domain.%';   -- Exact domain ending until dot