This appears to be because of implicit casting with the literals and functions. You can force consistency by explicitly casting the literal values:
-- Returns 5270.333333333
with cte (num) as
(select 2356::float union all
select 3456::float union all
select 9999::float)
select distinct avg(num) over()
from cte;
-- Returns 5270.333333333
with cte (num) as
(select 2356::float union all
select 3456::float union all
select 9999::float)
select avg(num)
from cte;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…