Using syntax/loc with ellipsis

You need to use with-syntax instead of using unsyntax.

#lang racket/base
(require (for-syntax racket/base
                     racket/syntax
                     syntax/stx
                     syntax/parse))

(define-syntax (define-constants stx)
  (syntax-parse stx
    [(_define-constants (name ...) (expr ...))
     (define (prepend-$ x) (format-id x "$~a" x))     
     (with-syntax ([($name ...) (stx-map prepend-$ #'(name ...))])
       #'(begin
           (define $name expr)
           ...))]))

(define-constants (foo bar) (11 22))

(list $foo $bar)

This result is '(11 22).