The film has overtaken the previous record holder, Inside Out 2, after making $1.7bn (£1.3bn) worldwide.