quotename(object_schema_name(@objectId)) returns null when called as a synonym
You have to add a parameter which indicates a database:

create function [dbo].[GetFqn](@objectId bigint, @DatabaseId INT)
returns varchar(100)
as
begin
    declare @fqn varchar(100);
    select @fqn = quotename(object_schema_name(@objectId, @DatabaseId)) + '.' + quotename(object_name(@objectId, @DatabaseId));
    return @fqn;
end


Then call:

select Utility.dbo.GetFqn([object_id], DB_ID())
from sys.tables