Sorry, just found out that this is a limitation of the message screen in Sql server management studio. The code below shows correct results
DECLARE @test NVARCHAR(MAX)
DECLARE @i INT
SET @i=0
set @test=cast('x' as nvarchar(max))
while(@i<6000)
begin
set @test= (@test+ cast('x' as nvarchar(max)))
set @i=@i+1
end
print len(@TEST)--6001