How can there be dreamless sleep and differing emotions and sensations if consciousness is the self and is permanent like in Advaita Vedanta and Kashmiri shaivism?
Srimad Bhagavatam 11.13.34
īkṣeta vibhramam idaṁ manaso vilāsaṁ
dṛṣṭaṁ vinaṣṭam ati-lolam alāta-cakram
vijñānam ekam urudheva vibhāti māyā
svapnas tridhā guṇa-visarga-kṛto vikalpaḥ
"One should see that the material world is a distinct illusion appearing in the mind, because material objects have an extremely flickering existence and are here today and gone tomorrow. They can be compared to the streaking red line created by whirling a fiery stick. 𝐓𝐡𝐞 𝐬𝐩𝐢𝐫𝐢𝐭 𝐬𝐨𝐮𝐥 𝐛𝐲 𝐧𝐚𝐭𝐮𝐫𝐞 𝐞𝐱𝐢𝐬𝐭𝐬 𝐢𝐧 𝐭𝐡𝐞 𝐬𝐢𝐧𝐠𝐥𝐞 𝐬𝐭𝐚𝐭𝐞 𝐨𝐟 𝐩𝐮𝐫𝐞 𝐜𝐨𝐧𝐬𝐜𝐢𝐨𝐮𝐬𝐧𝐞𝐬𝐬. 𝐇𝐨𝐰𝐞𝐯𝐞𝐫, 𝐢𝐧 𝐭𝐡𝐢𝐬 𝐰𝐨𝐫𝐥𝐝 𝐡𝐞 𝐚𝐩𝐩𝐞𝐚𝐫𝐬 𝐢𝐧 𝐦𝐚𝐧𝐲 𝐝𝐢𝐟𝐟𝐞𝐫𝐞𝐧𝐭 𝐟𝐨𝐫𝐦𝐬 𝐚𝐧𝐝 𝐬𝐭𝐚𝐠𝐞𝐬 𝐨𝐟 𝐞𝐱𝐢𝐬𝐭𝐞𝐧𝐜𝐞. 𝐓𝐡𝐞 𝐦𝐨𝐝𝐞𝐬 𝐨𝐟 𝐧𝐚𝐭𝐮𝐫𝐞 𝐝𝐢𝐯𝐢𝐝𝐞 𝐭𝐡𝐞 𝐬𝐨𝐮𝐥’𝐬 𝐜𝐨𝐧𝐬𝐜𝐢𝐨𝐮𝐬𝐧𝐞𝐬𝐬 𝐢𝐧𝐭𝐨 𝐧𝐨𝐫𝐦𝐚𝐥 𝐰𝐚𝐤𝐞𝐟𝐮𝐥𝐧𝐞𝐬𝐬, 𝐝𝐫𝐞𝐚𝐦𝐢𝐧𝐠 𝐚𝐧𝐝 𝐝𝐫𝐞𝐚𝐦𝐥𝐞𝐬𝐬 𝐬𝐥𝐞𝐞𝐩. All such varieties of perception, however, are actually māyā and exist only like a dream."
Srimad Bhagavatam 11.13.32
yo jāgare bahir anukṣaṇa-dharmiṇo 'rthān
bhuṅkte samasta-karaṇair hṛdi tat-sadṛkṣān
svapne suṣupta upasaṁharate sa ekaḥ
smṛty-anvayāt tri-guṇa-vṛtti-dṛg indriyeśaḥ
"While awake the living entity enjoys with all of his senses the fleeting characteristics of the material body and mind; while dreaming he enjoys similar experiences within the mind; and in deep dreamless sleep all such experiences merge into ignorance. By remembering and contemplating the succession of wakefulness, dreaming and deep sleep, the living entity can understand that he is one throughout the three stages of consciousness and is transcendental. Thus, he becomes the lord of the senses."
Commentary by disciples of BhaktiVedanta Swami Srila Prabhupad.
"Lord Kṛṣṇa stated that one must retire from material duality by the proper means, which the Lord now explains. One may first consider the three phases of consciousness mentioned above and then understand one’s own transcendental position as spirit soul. One experiences childhood, boyhood, adolescence, adulthood, middle age and old age, and throughout these phases one is experiencing things while awake and while dreaming. Similarly, one may, by careful intelligence, understand one’s lack of consciousness during deep sleep, and thus through intelligence one may have experience of lack of consciousness.
One may argue that it is actually the senses that experience during wakefulness and that it is the mind that experiences during dreams. However, the Lord here states, indriyeśaḥ: the living entity is actually the lord of the senses and mind, although temporarily he has become a victim of their influence. By Kṛṣṇa consciousness one may resume one’s rightful position as master of the mental and sensory faculties. Also, since the living entity can remember his experiences in these three stages of consciousness, he is ultimately the experiencing agent or the seer of all phases of consciousness. He remembers, “I saw so many things in my dream, and then my dream ended and I didn’t see anything. Now I’m waking up.” This universal experience can be understood by everyone, and thus everyone can understand that one’s actual identity is separate from the material body and mind."
Read the Māṇḍūkya Upaniṣad and the commentary by Gauḍapāda. They explain this clearly. They are so short you may as well read them yourself.
This is a very detailed translation with an extra verse (the opening invocation) that is missing from most translations, although it probably should be counted. (Anyone can make an account and it's free)
It would be quicker to learn by reading the Māṇḍūkya Upaniṣad and the commentary by Gauḍapāda yourself, but it is related to the nature of the fourth part of the word "Om."