A cryptographically secure hash function can handle any arbitrary sequence of bytes, regardless of what those bytes are or what pattern they may have, possibly up until a maximum size specified (which, for SHA-256, is $ 2^{64} $ bits).
It is true that SHA-256 uses a single one bit followed by zero bits as part of its padding (the Merkle-Dåmgard scheme). However, that pattern may occur in the input stream without a problem, and because the last block contains the input length, we can distinguish between that pattern in the input and that pattern as part of the padding scheme. So there isn't any specific in-band pattern that will cause the hash to end abruptly.
Note that other hash algorithms, such as SHA-3 and BLAKE2, use different padding schemes, and they also can handle arbitrary input patterns without a problem. These padding schemes, while different from the Merkle-Dåmgard construction, are also believed to be secure, and may actually be preferable for other reasons.
Typically, when we write an API to hash bytes, we end up with three functions: an initialization function, which sets up the algorithm with the proper parameters; an update function, which takes input to hash; and a finalization function, which performs padding, finishes the hashing, and returns the hash result. As such, we always explicitly indicate that the hashing is to end without regard to the input data.