Combine cream cheese and mayonnaise in a large bowl; beat with a mixer at medium speed until creamy. Gradually add sugar, beating well. Stir in cranberry sauce and pineapple. Fold in whipped topping and vanilla. Pour into an 8-inch square baking dish coated with cooking spray. Cover and freeze 8 hours. Let stand 10 minutes before cutting into squares.